var newWindow
var core_index
var model_index
var info_index
var input_string
var requested_core = " "

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function dpSmartLink(u,n,w,h,p) { // v1.4 by David Powers
  var a,j,k,x,y,f='';if(!n){n='';}if(w){f+='width='+w+',';}if(h){f+='height='+h+',';}
  if(p){p=p.split(':');if(p[0]!='z'){p[0]=='c'?(x=(screen.width-w)/2):x=p[0];f+='left='+x+',';}
  if(p[1]!='z'){if(p[0]=='c'){y=(screen.height-h-p[1])/2;if(navigator.appName.indexOf('Op')!=-1){
  y-=96;y=y<0?0:y;}}else{y=p[1];}f+='top='+y+',';}}a=arguments.length;if(a>5){for (k=5;k<a;k++){
  switch(arguments[k]){case 'all':f+='toolbar,menubar,location,scrollbars,status,resizable,';break;
  case 't':f+='toolbar,';break; case 'm':f+='menubar,';break;case 'l':f+='location,';break;
  case 'sc':f+='scrollbars,';break;case 's':f+='status,';break;case 'r':f+='resizable,';}}}
  if(f.charAt(f.length-1)==','){f=f.slice(0,-1);}j=window.open(u,n,f);j.focus();
  document.MM_returnValue=false;
}

function P7_getHW(t,a) { //v2.03 by PVII
  var r,p,h=0,w=0;if((p=MM_findObj(a)) !=null){
  if(document.all || document.getElementById){h=parseInt(p.offsetHeight);w=parseInt(p.offsetWidth);
  if(!h){h=parseInt(p.style.pixelHeight);w=parseInt(p.style.pixelWidth);}
  }else if(document.layers){h=parseInt(p.clip.height);w=parseInt(p.clip.width);}}
  if(t=="width"){r=w;}else{r=h;}return r; 
}

function MM_nbGroup(event, grpName) { //v3.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    if ((nbArr = document[grpName]) != null)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = args[i+1];
      nbArr[nbArr.length] = img;
  } }
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);



function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  newWindow = window.open(theURL,winName,features);
  newWindow.focus();
  return(newWindow);
}


function closeNewWindow()
{
	if (newWindow) {
		newWindow.close();
		newWindow = null;
	}
}

function set_page_variables() {

core_index = 0;
model_index = 0;
info_index = 0;

input_string = document.location.toString();

if (input_string.indexOf("cores/index") >= 0){
 core_index = 1;
 MM_nbGroup('over','cores','../graphics/nav/coresbtn_f2.gif','',1);
 check_core_page();
 }
if (input_string.indexOf("models/index") >= 0) model_index = 1;
if (input_string.indexOf("info/index") >= 0) info_index = 1;

}
function check_core_page(){
if (core_index == 1) {

MM_showHideLayers('coresmenu','','hide','modelsmenu','','hide','infomenu','','hide','cores2','','show');
}
else
{
MM_showHideLayers('coresmenu','','show','modelsmenu','','hide','infomenu','','hide','cores2','','hide');
}
}


// PVII Magic Menu Scripts

function P7_MM1dwt() { //v2.03 by PVII
  var g,lh,sw,fr = false;
  if(!document.p7mc)return;
  for(var x=0;x<p7m1.length;x++){tl=p7m1[x].id;lh="P7CM1DWT0"+tl;
	if((g=MM_findObj(lh)) !=null){fr=true;sw=0;break;}
	lh="P7CM1DWT1"+tl;if((g=MM_findObj(lh)) !=null){fr=true;sw=1;break;}}
  if(fr){eval("P7_trigMenuMagic1('"+tl+"',"+sw+")");}
}

function P7_setMenuMagic1() { //v2.03 by PVII
  var s,d,g,g2,gg,ww,kx,th,tu,ts,nu,xx,k=0,pa=0;args=P7_setMenuMagic1.arguments;
  if((navigator.appName=="Netscape") && parseInt(navigator.appVersion)>4 && navigator.userAgent.indexOf("Opera")==-1){pa="px";}
  if(navigator.userAgent.indexOf("Opera")>-1){P7OperaW=window.innerWidth;P7OperaH=window.innerHeight;}
  if(!document.p7mc) {
   p7m=new Array();document.p7mc=true;p7ms=new Array();document.P7_imswap=new Array();document.P7_imswapo=new Array();
   p7m1=new Array();p7m2=new Array();p7mprop=new Object();p7mprop.p7offset=args[0];p7mprop.p7rate=args[1];
   p7mprop.p7delay=args[2];p7mprop.p7bottom=args[3];
   if(document.layers){p7mprop.p7pageh = document.height;}}
  for(var x=4;x<args.length;x+=3){if((g=MM_findObj(args[x])) !=null){
    p7m[k]=args[x];g.p7imname=args[x+2];g.p7sub=args[x+1];
    g2=MM_findObj(args[x+2]);tu=g2.src;ts=tu.lastIndexOf(".");
    nu=tu.substring(0,ts)+"_open"+tu.substring(ts,tu.length);
	nu2=tu.substring(0,ts)+"_over"+tu.substring(ts,tu.length);
    document.P7_imswap[k]=new Image();document.P7_imswap[k].src=nu;
	document.P7_imswapo[k]=new Image();document.P7_imswapo[k].src=nu2;k++;}}
  var lf=0;for (var j=0;j<p7m.length;j++){
   if((g=MM_findObj(p7m[j])) !=null){d=(document.layers)?g:g.style;p7m1[j]=g;g.p7waiting=false;
    if(j==0){lf=parseInt(d.left);th=parseInt(d.top);}
    if(j>0){d.left=(lf+pa);th+=P7_getHW('height',p7m[j-1]);d.top=(th+pa);}
    if((s=MM_findObj(g.p7sub)) !=null){p7m2[j]=s;ww=P7_getHW('width',g.p7sub);
     kx=lf-ww-20;dd=(document.layers)?s:s.style;
     dd.left=(kx+pa);dd.top=(th+pa);p7ms[j]=th;dd.visibility="visible";s.p7open=false;s.p7waiting=false;}}}
  if((g=MM_findObj(p7mprop.p7bottom)) !=null){d=(document.layers)?g:g.style;
   d.left=(lf+parseInt(args[0])+pa);th+=P7_getHW('height',p7m[p7m.length-1]);d.top=(th+pa);}
}

function P7_wait(a) { //v2.03 by PVII
  var ma,mb;if((mb=MM_findObj(a)) !=null){
   if(!mb.p7waiting || mb.p7waiting=="none"){return;}
    ma=mb.p7waiting;mb.p7waiting=false;eval(ma);}
}

function P7_trigMenuMagic1(a,sw) { //v2.03 by PVII
  var x,g,gg,d,dd,w,lp,tp,im,im2,ts,nu,e,pa=0;
  if(!document.p7mc)return;
  if((navigator.appName=="Netscape") && parseInt(navigator.appVersion)>4 && navigator.userAgent.indexOf("Opera")==-1){pa="px";}
  if(navigator.userAgent.indexOf("Opera")>-1){if( P7OperaW!=window.innerWidth || P7OperaH!=window.innerHeight)P7_setMenuMagic1();}
  var ofs=parseInt(p7mprop.p7offset),trt = parseInt(p7mprop.p7rate);
  var tdy=parseInt(p7mprop.p7delay),tsb,tlf,tst;
  for(x=0;x<p7m.length;x++){if(p7m[x]==a){
    d=p7m1[x];dd=(document.layers)?d:d.style;g=p7m2[x];gg=(document.layers)?g:g.style;
	e=MM_findObj(d.p7imname);im=e.src;ts=im.replace("_open","");ts=ts.replace("_over","");
	 if(!g.p7open){tst="closed";im2=ts.lastIndexOf(".");
	  nu=ts.substring(0,im2)+"_open"+ts.substring(im2,ts.length);ts = nu;
	 }else{tst="open"}break;}}
  for(j=0;j<p7m.length;j++){
   d=p7m1[j];dd=(document.layers)?d:d.style;g=p7m2[j];gg=(document.layers)?g:g.style;
   if(j==0){tlf=parseInt(dd.left);}
   if(g.p7open){w=P7_getHW('width',d.p7sub)+20;w-=parseInt(dd.left);w*=-1;d.p7waiting=false;
	eval("P7_BM1('"+d.p7sub+"',"+w+","+parseInt(gg.top)+","+trt+","+tdy+",0,0)");}
	d.p7waiting=false;g.p7open=false;
    if(parseInt(sw)==1){e=MM_findObj(d.p7imname);im=e.src;im2=im.replace("_open","");e.src=im2;}}
  var tnt=new Array();var df=0,tcd=0,tdl=p7m[0];
  for(j=0;j<p7m.length;j++){
   d=p7m1[j];dd=(document.layers)?d:d.style;g=p7m2[j];gg=(document.layers)?g:g.style;
   if(j==0){th=parseInt(dd.top);}tnt[j]=th;df=Math.abs(parseInt(dd.top)-th);
   if(df>tcd){tdl=p7m[j];tcd=df;}th+=P7_getHW('height',p7m[j]);
   if(x==j && tst=="closed"){tsb=th;th+=P7_getHW('height',d.p7sub);}p7ms[j]=th;}
   if(tst=="closed") {d=p7m1[x];dd=(document.layers)?d:d.style;
	g=p7m2[x];gg=(document.layers)?g:g.style;lp=tlf+ofs;
	gg.top=(tsb+pa);p7ms[x]=tsb;gg.visibility="visible";e=MM_findObj(d.p7imname);
	if(parseInt(sw)==1){e.src=ts;}var r;g.p7open=true;r=MM_findObj(tdl);		
	r.p7waiting="P7_BM1('"+d.p7sub+"',"+lp+","+tsb+","+trt+","+tdy+",0,0)" ;
   }else{d=p7m1[p7m1.length-1];d.p7waiting="none";}
  for(j=0;j<p7m.length;j++ ){eval("P7_BM1('"+p7m[j]+"',"+tlf+","+tnt[j]+","+trt+","+tdy+",0,0)");}
  if((g=MM_findObj(p7mprop.p7bottom)) !=null){d=(document.layers)?g:g.style;g.p7waiting=false;
   eval("P7_BM1('"+p7mprop.p7bottom+"',"+(tlf+ofs)+","+th+","+trt+","+tdy+",0,0)");
   th+=(document.layers)?P7_getHW('height',p7mprop.p7bottom):0;}
  if(document.layers){var tw2=document.width;
    if(document.height<th) {document.height=th;document.width=tw2;}}
}

function P7_rollCMenu1(ev,a,b) { //v2.02 by PVII
 var e,im,ts,j,nu,g,tev=ev.type;
 
 if(!document.p7mc){return;}
 if(tev=="mouseover"){for(var x=0;x<p7m.length;x++){
 if(p7m[x]==a){g=p7m2[x];if(parseInt(b)==0 && g.p7open) {break;return;}
 e=MM_findObj(p7m1[x].p7imname);im=e.src;ts=im.replace("_open","");
 ts=ts.replace("_over","");j=ts.lastIndexOf(".");
 e.src=ts.substring(0,j)+"_over"+ts.substring(j,ts.length);break;}}
 }else if(tev=="mouseout"){for(var x=0;x<p7m.length;x++){
 if(p7m[x]==a){e=MM_findObj(d=p7m1[x].p7imname);im=e.src;
 g=p7m2[x];ts=im.replace("_open","");ts=ts.replace("_over","");
 if(g.p7open){j=ts.lastIndexOf(".");
 nu=ts.substring(0,j)+"_open"+ts.substring(j,ts.length);
 }else{nu=ts;}e.src=nu;break;}}}
}

function P7_BM1(el,x,y,a,b,c,s) { //v2.03 by PVII
 var g,elo=el,f="",m=false,d="";x=parseInt(x);y=parseInt(y);
 var t = 'g.p7BM = setTimeout("P7_BM1(\''+elo+'\','; 
 if ((g=MM_findObj(el))!=null) {d=(document.layers)?g:g.style;}else{return;}
 var xx=(parseInt(d.left))?parseInt(d.left):0;
 var yy=(parseInt(d.top))?parseInt(d.top):0;
 var i=parseInt(a);
  if (eval(g.moved)){clearTimeout(g.p7BM);}
  if (xx<x){xx+=i;m=true;if(xx>x){xx=x;}}
  if (xx>x){xx-=i;m=true;if(xx<x){xx=x;}}
  if (yy<y){yy+=i;m=true;if(yy>y){yy=y;}}
  if (yy>y){yy-=i;m=true;if(yy<y){yy=y;}}
 if (m) {if((navigator.appName=="Netscape") && parseInt(navigator.appVersion)>4 && navigator.userAgent.indexOf("Opera")==-1){
    xx+="px";yy+="px";}
  d.left=xx;d.top=yy;g.moved=true;eval(t+x+','+y+','+a+','+b+','+c+',0)",'+b+')');
  }else {g.moved=false;P7_wait(elo);}
}


// Magic Menu Tree Scripts
function P7_TMenu(b,og) { //v2.5 by Project Seven Development(PVII)
 var i,s,c,k,j,tN,hh;if(document.getElementById){
 if(b.parentNode && b.parentNode.childNodes){tN=b.parentNode.childNodes;}else{return;}
 for(i=0;i<tN.length;i++){if(tN[i].tagName=="DIV"){s=tN[i].style.display;
 hh=(s=="block")?"none":"block";if(og==1){hh="block";}tN[i].style.display=hh;}}
 c=b.firstChild;if(c.data){k=c.data;j=k.charAt(0);if(j=='+'){k='-'+k.substring(1,k.length);
 }else if(j=='-'){k='+'+k.substring(1,k.length);}c.data=k;}if(b.className=='p7plusmark'){
 b.className='p7minusmark';}else if(b.className=='p7minusmark'){b.className='p7plusmark';}}
}

function P7_setTMenu(){ //v2.5 by Project Seven Development(PVII)
 var i,d='',h='<style type=\"text/css\">';if(document.getElementById){
 var tA=navigator.userAgent.toLowerCase();if(window.opera){
 if(tA.indexOf("opera 5")>-1 || tA.indexOf("opera 6")>-1){return;}}
 for(i=1;i<20;i++){d+='div ';h+="\n#p7TMnav div "+d+"{display:none;}";}
 document.write(h+"\n</style>");}
}
P7_setTMenu();

function P7_TMopen(){ //v2.5 by Project Seven Development(PVII)
 var i,x,d,hr,ha,ef,a,ag;if(document.getElementById){d=document.getElementById('p7TMnav');
 if(d){hr=window.location.href;ha=d.getElementsByTagName("A");if(ha&&ha.length){
 for(i=0;i<ha.length;i++){if(ha[i].href){if(hr.indexOf(ha[i].href)>-1){
 ha[i].className="p7currentmark";a=ha[i].parentNode.parentNode;while(a){
 if(a.firstChild && a.firstChild.tagName=="A"){if(a.firstChild.onclick){
 ag=a.firstChild.onclick.toString();if(ag&&ag.indexOf("P7_TMenu")>-1){
 P7_TMenu(a.firstChild,1);}}}a=a.parentNode;}}}}}}}
}

function P7_TMall(a){ //v2.5 by Project Seven Development(PVII)
 var i,x,ha,s,tN;if(document.getElementById){ha=document.getElementsByTagName("A");
 for(i=0;i<ha.length;i++){if(ha[i].onclick){ag=ha[i].onclick.toString();
 if(ag&&ag.indexOf("P7_TMenu")>-1){if(ha[i].parentNode && ha[i].parentNode.childNodes){
 tN=ha[i].parentNode.childNodes;}else{break;}for(x=0;x<tN.length;x++){
 if(tN[x].tagName=="DIV"){s=tN[x].style.display;if(a==0&&s!='block'){P7_TMenu(ha[i]);
 }else if(a==1&&s=='block'){P7_TMenu(ha[i]);}break;}}}}}}
}

function P7_TMclass(){ //v2.5 by Project Seven Development(PVII)
 var i,x,d,tN,ag;if(document.getElementById){d=document.getElementById('p7TMnav');
 if(d){tN=d.getElementsByTagName("A");if(tN&&tN.length){for(i=0;i<tN.length;i++){
 ag=(tN[i].onclick)?tN[i].onclick.toString():false;if(ag&&ag.indexOf("P7_TMenu")>-1){
 tN[i].className='p7plusmark';}else{tN[i].className='p7defmark';}}}}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function validate_master_password(passForm){

if (passForm.internalPass.value != "xxxxxx")
{
alert("You must enter a valid password to enter internal pages");
return(false);
}

return(true);

}

function findRequestingCore(){
	var handyString = location.search;
	var startOfSource=handyString.indexOf("corename=");
	if (startOfSource != -1) {
	var endOfSource = handyString.indexOf("&",startOfSource+9);
	var result = handyString.substring(startOfSource+9,endOfSource);
	}
	else
	{
	var result = "";
	}
	
	return result
	}
	
	
	function MM_setTextOfTextfield(objName,x,newText) { //v3.0
  var obj = MM_findObj(objName); if (obj) obj.value = newText;
}
	
	function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
	
	function submit_altera_opencore_Form2(coreInfoForm){
	
	submitForm(coreInfoForm);
	var radioset;
	radioset = false;
	if (coreInfoForm.altera_id[0].checked){
	radioset = true;
	if (coreInfoForm.NIC.value == ""){
	alert('A valid identification number is required.\n');
	return(false);
	}}else if (coreInfoForm.altera_id[1].checked){
	radioset = true;
	if (coreInfoForm.Host_Id.value == ""){
	alert('A valid identification number is required.\n');
	return(false);
	}}else if (coreInfoForm.altera_id[2].checked){
	radioset = true;
	if (coreInfoForm.Disk_Serial_Number.value == ""){
	alert('A valid identification number is required.\n');
	return(false);
	}}else if (coreInfoForm.altera_id[3].checked){
	radioset = true;
	if (coreInfoForm.Guard_Id.value == ""){
	alert('A valid identification number is required.\n');
	return(false);
	}}else if (coreInfoForm.altera_id[4].checked){
	radioset = true;
	if (coreInfoForm.License.value == ""){
	alert('A valid identification number is required.\n');
	return(false);
	}}
	if (radioset == false){
	alert('A valid identification number is required.\n');
	return(false);
	}
	MM_validateForm('First_Name','','R','Last_Name','','R','Cores','','R','Email','','RisEmail','Phone','','R','Company','','R','Core_Name','','R','Altera_Device_Name','','R');
	
	return document.MM_returnValue;
	
	}
	
	
	function submit_altera_opencore_Form(coreInfoForm){
	
	submitForm(coreInfoForm);
	MM_validateForm('First_Name','','R','Last_Name','','R','Cores','','R','Email','','RisEmail','Phone','','R','Company','','R','Core_Name','','R','Altera_Device_Name','','R','Quartus_Version','','R','NIC','','R','Host_Id_Serial_Number','','R','Guard_Id_License','','R');
	
	return document.MM_returnValue;
	
	}
	
	function reset_altera_ids(){
	
	
	
	document.opencore_request.NIC.value = "";
	document.opencore_request.NIC.disabled=true;
	document.opencore_request.NIC.style.backgroundColor='#cccccc';
	document.opencore_request.Host_Id.disabled=true; 
	document.opencore_request.Host_Id.value = "";
	document.opencore_request.Host_Id.style.backgroundColor='#cccccc';
	document.opencore_request.Disk_Serial_Number.disabled=true;
	document.opencore_request.Disk_Serial_Number.value = "";
	document.opencore_request.Disk_Serial_Number.style.backgroundColor='#cccccc';
	document.opencore_request.Guard_Id.disabled=true;
	document.opencore_request.Guard_Id.value = "";
	document.opencore_request.Guard_Id.style.backgroundColor='#cccccc';
	document.opencore_request.License.disabled=true;
	document.opencore_request.License.value = "";
	document.opencore_request.License.style.backgroundColor='#cccccc';
	
	
	}
	
	function formReset(){
	alert("in formReset again");
	document.newsletter_request.user_phone.value = "";
	alert("in formReset again again");
	}

function submit_synplicity_Form(synplicityForm){
	
	
	
	MM_validateForm('name','','R','company','','R','country','','R','email','','RisEmail','phone','','R','zip','','R');
		
	return document.MM_returnValue;
	
	}
	
	
	function submit_core_query_Form(coreInfoForm){
	
	submitForm(coreInfoForm);
	
	MM_validateForm('First_Name','','R','Last_Name','','R','Cores','','R','Email','','RisEmail','Phone','','R','Company','','R');
		
	return document.MM_returnValue;
	
	}
	
	function submit_meeting_request(coreInfoForm){
	
	expireDate = new Date;
	expireDate.setMonth(expireDate.getMonth()+6);
	document.cookie = "firstName="+escape(coreInfoForm.First_Name.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "lastName="+escape(coreInfoForm.Last_Name.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "company="+escape(coreInfoForm.Company.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "email="+escape(coreInfoForm.Email.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "Title="+escape(coreInfoForm.Title.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "Address1="+escape(coreInfoForm.address1.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "Address2="+escape(coreInfoForm.address2.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "City="+escape(coreInfoForm.city.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "State="+escape(coreInfoForm.state.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "Zip="+escape(coreInfoForm.zip.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "phone="+escape(coreInfoForm.Phone.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "country="+escape(coreInfoForm.Country.value)+";expires=" + expireDate.toGMTString();
		  	
	
	
	MM_validateForm('First_Name','','R','Last_Name','','R','Email','','RisEmail','Phone','','R','Title','','R','Company','','R','First_Choice_Meeting_Time','','R','Second_Choice_Meeting_Time','','R','Project_Description','','R');
		
	return document.MM_returnValue;
	
	}
	function submitForm(coreInfoForm){
	
	
	expireDate = new Date;
	expireDate.setMonth(expireDate.getMonth()+6);
	document.cookie = "firstName="+escape(coreInfoForm.First_Name.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "lastName="+escape(coreInfoForm.Last_Name.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "company="+escape(coreInfoForm.Company.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "email="+escape(coreInfoForm.Email.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "Title="+escape(coreInfoForm.title.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "Address1="+escape(coreInfoForm.address1.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "Address2="+escape(coreInfoForm.address2.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "City="+escape(coreInfoForm.city.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "State="+escape(coreInfoForm.state.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "Zip="+escape(coreInfoForm.zip.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "phone="+escape(coreInfoForm.Phone.value)+";expires=" + expireDate.toGMTString();
	document.cookie = "country="+escape(coreInfoForm.Country.value)+";expires=" + expireDate.toGMTString();
		  	
	
	}
	
	function GetCookie (name){
	var result="";
	var myCookie = " " + document.cookie + ";";
	
	var searchName = " " + name + "=";
	
	var startOfCookie = myCookie.indexOf(searchName);
	var endOfCookie;
	if (startOfCookie != -1) {
	startOfCookie += searchName.length;
	endOfCookie = myCookie.indexOf(";",startOfCookie);
	result=unescape(myCookie.substring(startOfCookie,endOfCookie));
	
	}
	return result;
	}
	
	
	var user;
var domain;
var suffix;
function hideem(user, domain, suffix){
document.write('<a href="' + 'mai' + 'lto:' + user + '@' + domain + '.' + suffix + '">' + user + '@' + domain + '.' + suffix + '</a>');
}


function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}

