
var fullpath=new String(window.location);
//var ImagePathArr=fullpath.split("div");
//var ImagePath = ImagePathArr[0]+"div/images/"
//var LinkPath = ImagePathArr[0]+"div/"

var ServerHost=document.location.host;
//var ImagePath = "http://"+ServerHost+"/images/"
//var LinkPath = "http://"+ServerHost+"/"
var ImagePath = "http://www.ophiropt.com/images/"
var LinkPath = "http://www.ophiropt.com/"

if (document.images) {

image1on = new Image(); image1on.src = ImagePath+"corporateO.gif";
image2on = new Image(); image2on.src = ImagePath+"co2O.gif";
image3on = new Image(); image3on.src = ImagePath+"opticsO.gif";
image4on = new Image(); image4on.src = ImagePath+"laserO.gif";
image5on = new Image(); image5on.src = ImagePath+"optimetO.gif";

image1off = new Image(); image1off.src = ImagePath+"corporate.gif";
image2off = new Image(); image2off.src = ImagePath+"co2.gif";
image3off = new Image(); image3off.src = ImagePath+"optics.gif";
image4off = new Image(); image4off.src = ImagePath+"laser.gif";
image5off = new Image(); image5off.src = ImagePath+"optimet.gif";


}
function register(reg_file){

window.open("../register.php?item="+reg_file,'an','toolbar=no,member=no,location=no,directories=no,scrollbars=yes,status=no,copyhistory=no,resizable=yes,height=500,width=450');
/*  if (window.focus) {nwin1.focus();}*/
}

function register_enews(reg_file){

window.open("http://www.ophiropt.com/laser/register.php?item="+reg_file+"&enews=enews",'an','toolbar=no,member=no,location=no,menubar=no,directories=no,scrollbars=yes,status=no,copyhistory=no,resizable=yes,height=740,width=580');
}
function register_co2(type,code){

window.open("../register.php?type="+type+"&code="+code,'an','toolbar=no,member=no,location=no,directories=no,scrollbars=yes,status=no,copyhistory=no,resizable=yes,height=500,width=450');


}

function turnOn(imageName) {
  if (document.images) {
     document[imageName].src = eval (imageName + "on.src");
  }
}

function turnOff (imageName) {
  if (document.images) {
     document[imageName].src = eval (imageName + "off.src");
  }
}

function check_form_search ()
	{
		if (document.search.search_word.value == "")
			{
				alert ("Please enter one or more search word in the search box");
				document.search.search_word.focus();
				return false;
			}
	}




     // Detect Browser
     var IE = (document.all) ? 1 : 0;
     var DOM = 0;
     if (parseInt(navigator.appVersion) >=5) {DOM=1};

	function showDiv(who) {
		var viewer;
		if (DOM) {
            viewer = document.getElementById(who)
		} else if (IE) {
			viewer = document.all[who];
		}

		if (viewer.style.display != "block") {
			viewer.style.display = "block";
		} else {
			viewer.style.display = "none";
		}
	}



	
function PopWin(url, name, w, h) 
{	
	window.open(url,name,'width='+w+',height='+h+',scrollbars=0,status=0,resizable=0,top=0,left=0',1);
}
	
var txt1='<table cellpadding="0" cellspacing="0" border="1"><tr><td><img src="'+ImagePath+'pixel.gif" alt="" width="26" height="7" border="0"></td><td><img src="'+ImagePath+'1about.gif" alt="" width="33" height="7" border="0"></td><td bgcolor="#003881"><img src="'+ImagePath+'pixel.gif" alt="" width="1" height="7" border="0"></td></tr></table>';
var txt2='<table cellpadding="0" cellspacing="0" border="1"><tr><td><img src="'+ImagePath+'pixel.gif" alt="" width="26" height="7" border="0"></td><td><img src="'+ImagePath+'1about.gif" alt="" width="33" height="7" border="0"></td><td bgcolor="#003881"><img src="'+ImagePath+'pixel.gif" alt="" width="1" height="7" border="0"></td></tr></table>';
