function WinOpen(u,h)
{
var DetailsWin;
x=(screen.width-502)/2;
if (x<0)x=0;
h=Math.min(screen.height*0.9,h);
y=(screen.height-h)/2;
ww="=window.open('"+u+"','DetailsWin','width=502,height="+h+",left="+x+",top="+y+",menubar=no,scrollbars=yes')";
if(DetailsWin==null)
	{
	eval("DetailsWin"+ww);
	DetailsWin.focus();
	}
else
	{
	if (DetailsWin.closed)
		{
		eval("DetailsWin"+ww);
		DetailsWin.focus();
		}
	}
}

function movepic(img_name,img_src) {
document[img_name].src=img_src;
}
function movepicBg(img_name,img_src) {
document[img_name].background=img_src;
}
function ContactUs(theURL) { //v2.0
  window.open(theURL,'ContactUs','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=500, height=300, screenX=150, screenY=150, top=150, left=150');
}

function searchWindow(theURL) { //v2.0
  window.open(theURL,'SearchWindow','toolbar=yes, location=yes, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=500, height=500, screenX=150, screenY=150, top=150, left=150');
}
function visitLink (url) {
newWin=window.open(url, 'basewindow');
newWin.focus();
}
function EmailWindow(theURL) { //v2.0
  window.open(theURL,'EmailWindow','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=500, height=380, screenX=150, screenY=150, top=150, left=150');
}
// Style changing functions for html elements
function getRef(obj){
    return (typeof obj == "string") ?
    document.getElementById(obj) : obj;
}
function setStyle(obj,style,value){
    getRef(obj).style[style]= value;
}
function setClassName(obj, className){
    getRef(obj).className= className;
}
function toggleStyle(obj, style, value1, value2){
    obj= getRef(obj);
    // obj.isValue1 will be false the first time.
    if(!obj.isValue1){
        obj.style[style]= value1;
        obj.isValue1= true;
    }
    else{
        obj.style[style]= value2;
        obj.isValue1= false;
    }
}
function toggleClassName(obj, class1, class2){
    obj= getRef(obj);
    // obj.isClass1 will be false the first time.
    if(!obj.isClass1){
        obj.className= class1;
        obj.isClass1= true;
    }
    else{
        obj.className= class2;
        obj.isClass1= false;
    }
}

