// JavaScript Document<script>

function PopupCenter(pageURL, title,w,h) {
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no,navigation=no, width='+w+', height='+h+', top='+top+', left='+left);
}

function popup(url)
{
  	w = screen.width-110;
	h = screen.height-50;
	
	window.open(url,'Photo Gallery', 'status=no,location=no,toolbar=no,scrollbars=yes,menu=no,resizable=no,width='+w+',height='+h+',left=50,top=50');

}

function css_popup(url)
{
//var w = screen.width-300;
//var	h = screen.height-200;
var w = 800;
var	h = 800;
var boxw= 650;
var	boxh = 590;
var imgw=650;
var left=(screen.width-w)/2;
var top=(screen.height-h)/2;
var params='width='+w+',height='+h;
params+=',top='+top+',left='+left;
params+=',status=no,location=0,toolbar=0,scrollbars=0,menubar=0,resizable=1, copyhistory=0,directories=0,titlebar=0';

var url=url;
var generator=window.open('','Photo Gallery',params);

generator.document.write ('<html><head><title>Photo Galerie</title> ');
generator.document.write ('<link rel="stylesheet" type="text/css" href="css/boxes.css">');
generator.document.write ('<link rel="stylesheet" type="text/css" href="css/text_style.css">');
generator.document.write ('</head><body style="padding:0px;margin:0;text-align:center">');
generator.document.write ('<div style="width:99%;margin: 0 auto;  text-align:center">');
//generator.document.write ('<div class="TextBoxGrey" style="text-align:center; padding:5px; width:'+ boxw+'px;left:'+left+'px;top:'+top+'px">');
generator.document.write ('<img src='+url+' width='+imgw+' align="center" />');
generator.document.write ('</div>');
generator.document.write ('</body>');
generator.document.write ('</html>');

if (window.focus) {generator.focus(); return false; }

}



function select_url()
{
 var destination=document.frmChCores.cmbCores.value;
 var version = navigator.appVersion;
 // sets variable == browser version
 if(destination!="no_page")
 {
  if (version.indexOf("MSIE") >= -1)
  // checks to see if using IE
  {
   window.location.href=destination;
  }
  else
  {
   window.open(destination, target="_self");
  }
 }
}
/* select link function  */
function selectLink(cmbName)
{
var m=document.getElementById(cmbName);
var destination=m.options[m.options.selectedIndex].value;
var version = navigator.appVersion;

if(destination!="n\a")
 {
	  if (version.indexOf("MSIE") >= -1)
  // checks to see if using IE
  {
	 window.location.href=destination;
  }
  else
  {
	window.open(destination, target="_self");
  }
 }
}


function cmbselect_url(cmbName)
{
	if (cmbName=='cmbIntLinks')
	{
		
		var destination=document.form1.cmbIntLinks.value;
		//document.write(destination);
	}
	
	if (cmbName=='cmbExtLinks')
	{
		//document.write(cmbName);
		var destination=document.form2.cmbExtLinks.value;
	}
//var frm=frmName.cmbName
//var cmb=form1.cmb;
//document.writeln(frm);
//document.write(frmName);

//document.write(destination);
 var version = navigator.appVersion;
 // sets variable == browser version
 if(destination!="no_page")
 {
  if (version.indexOf("MSIE") >= -1)
  // checks to see if using IE
  {
   window.location.href=destination;
  }
  else
  {
   window.open(destination, target="_blank");
  }
 }
}


function activate(link){
if(document.getElementById)
document.getElementById(link).focus();
else if (document.all)
document.all(link).focus();
}

/* show div*/

function MM_changeProp(objId,x,theProp,theValue) { //v9.0
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(objId); }
  if (obj){
    if (theValue == true || theValue == false)
      eval("obj.style."+theProp+"="+theValue);
    else eval("obj.style."+theProp+"='"+theValue+"'");
  }
}


 function show_div(id1,id2,id3,id4,id5) 
	{
	
		MM_changeProp(id1,'','display','block','DIV');
		MM_changeProp(id2,'','display','none','DIV');
		MM_changeProp(id3,'','display','none','DIV');
		MM_changeProp(id4,'','display','none','DIV');
		MM_changeProp(id5,'','display','none','DIV');
      //}
	}
	
  function opt(f)
  {
  var selNum =f.cmbCores.selectedIndex;
  //document.write(selNum);
  var a= f.cmbCores.options[selNum].value;
  //document.write(selNum);
  //document.write(a);
 switch(selNum)
		 {
		 case 1:
		 //document.write(a);
		 show_div('id1','id2','id3','id4','id5')
		
		 break;
		 
		 case 2:
		 show_div('id2','id1','id3','id4','id5')
		
		  break;
		  
		   case 3:
		   show_div('id3','id1','id2','id4','id5')
	
		  break;
		  		  
		   case 4:
		   show_div('id4','id1','id2','id3','id5')
			break;
				  
		  case 5:
		  show_div('id5','id1','id2','id3','id4')
		  break;
		 }
    }
	
