function bigimage(image,title,wid,hgt)
{
	sw=(screen.width-wid)/2;
	sh=(screen.height-hgt)/2;
	newwin=window.open('','newwin','width='+wid+',height='+hgt+',scrollbars=0,menubars=0,toolbars=0,statusbar=false,loca tion=0,directories=0,status=0,top='+sh+',left='+sw+'');
	newwin.document.open();
	newwin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n');
	newwin.document.write('"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">');
	newwin.document.write('\n<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />\n');
	newwin.document.write('<meta http-equiv="Imagetoolbar" content="no" />\n');
	newwin.document.write('<title>'+title+'</title>\n');
	newwin.document.write('</head>');
	newwin.document.write('<body style="margin:0;padding:0">\n<img src="'+image+'" width="'+wid+'" height="'+hgt+'" />');
	newwin.document.write('\n</body></html>');
	newwin.document.close();
	newwin.focus();
}

function main() {
document.getElementById('main').style.display='';
document.getElementById('digital').style.display='none';
document.getElementById('global').style.display='none';
document.getElementById('teambook2').style.display='none';
document.getElementById('tikshoov').style.display='none';
document.getElementById('tactixpeach').style.display='none';
}
function digital() {
document.getElementById('main').style.display='none';
document.getElementById('digital').style.display='';
document.getElementById('global').style.display='none';
document.getElementById('teambook2').style.display='none';
document.getElementById('tikshoov').style.display='none';
document.getElementById('tactixpeach').style.display='none';
}
function global() {
document.getElementById('main').style.display='none';
document.getElementById('digital').style.display='none';
document.getElementById('global').style.display='';
document.getElementById('teambook2').style.display='none';
document.getElementById('tikshoov').style.display='none';
document.getElementById('tactixpeach').style.display='none';
}
function teambook2() {
document.getElementById('main').style.display='none';
document.getElementById('digital').style.display='none';
document.getElementById('global').style.display='none';
document.getElementById('teambook2').style.display='';
document.getElementById('tikshoov').style.display='none';
document.getElementById('tactixpeach').style.display='none';
}
function tikshoov() {
document.getElementById('main').style.display='none';
document.getElementById('digital').style.display='none';
document.getElementById('global').style.display='none';
document.getElementById('teambook2').style.display='none';
document.getElementById('tikshoov').style.display='';
document.getElementById('tactixpeach').style.display='none';
}
function tactixpeach() {
document.getElementById('main').style.display='none';
document.getElementById('digital').style.display='none';
document.getElementById('global').style.display='none';
document.getElementById('teambook2').style.display='none';
document.getElementById('tikshoov').style.display='none';
document.getElementById('tactixpeach').style.display='';
}


function ReadQueryStrings(QS1, QS2)
{
    document.all.jobID.value = getParam(QS1);
    document.all.jobName.value = getParam(QS2);
}

function getParam(getParam)
{   
	var result = "";
	var Params = parent.location.search.substring(1).split("&");
	var variable = "";
	for (var i = 0; i < Params.length; i++)
	{
		if (Params[i].split("=")[0] == getParam)
		{
			if (Params[i].split("=").length > 1) variable = Params[i].split("=")[1];
			result = variable;
		}
	}
	return result;
}



/* validation */

function echeck(str) 
{
    var at="@"
    var dot="."
    var lat=str.indexOf(at)
    var lstr=str.length
    var ldot=str.indexOf(dot)
    if (str.indexOf(at)==-1){
       alert("Invalid E-mail Address")
       return false
    }

    if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
       alert("Invalid E-mail Address")
       return false
    }

    if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
        alert("Invalid E-mail Address")
        return false
    }

     if (str.indexOf(at,(lat+1))!=-1){
        alert("Invalid E-mail Address")
        return false
     }

     if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
        alert("Invalid E-mail Address")
        return false
     }

     if (str.indexOf(dot,(lat+2))==-1){
        alert("Invalid E-mail Address")
        return false
     }

     if (str.indexOf(" ")!=-1){
        alert("Invalid E-mail Address")
        return false
     }

     return true;					
}


function ValidateContactUsHeb()
{
    /*
	var fname=document.ContactUsHeb.fname;
	var email=document.ContactUsHeb.email;

	if ((fname.value==null)||(fname.value=="")){
		alert("Please Enter your First Name")
		fname.focus()
		return false
	}
	if ((email.value==null)||(email.value=="")){
		alert("Please Enter your Email")
		email.focus()
		return false
	}
	if (echeck(email.value)==false){
		email.focus()
		return false
	}
	*/
	
	document.ContactUsHeb.submit();
}

function ValidateContactUsEng()
{
    /*
	var fname=document.ContactUsEng.fname;
	var email=document.ContactUsEng.email;

	if ((fname.value==null)||(fname.value=="")){
		alert("Please Enter your First Name")
		fname.focus()
		return false
	}
	if ((email.value==null)||(email.value=="")){
		alert("Please Enter your Email")
		email.focus()
		return false
	}
	if (echeck(email.value)==false){
		email.focus()
		return false
	}
	*/
	
	document.ContactUsEng.submit();
}

function ValidateSendCVEng()
{
    document.SendCVEng.submit();
}

function ValidateSendCVHeb()
{
    document.SendCVHeb.submit();
}
