
//copyright ibs-multimedia Default browsercheck, added to all scripts!
function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
} 
bw=new checkBrowser()
//With nested layers for netscape, this function hides the layer if it's visible and visa versa
function showHide(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
	if(obj.visibility=='visible' || obj.visibility=='show') obj.visibility='hidden'
	else obj.visibility='visible'
}
//Shows the div
function show(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
	obj.visibility='visible'
}
//Hides the div
function hide(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
	obj.visibility='hidden'
}
function flip() {parent.document.getElementById('kt').rows="*,30"}
//TOP Menu--------------------------------------------------------------------------------------------------------------------------
function but1(){parent.f1.location.href="firm.html";flip();parent.f2.location.href="bott.html";}
function but2(){parent.f1.location.href="cardboard.html";flip();parent.f2.location.href="bott.html";}
function but3(){parent.f1.location.href="packing.html";flip();parent.f2.location.href="bott.html";}
function but4(){parent.f1.location.href="recycling.html";flip();parent.f2.location.href="bott.html";}
function but5(){parent.f1.location.href="client.html";flip();parent.f2.location.href="bott.html";}
function but6(){parent.f1.location.href="dummy.html";}
function but7(){parent.f1.location.href="home.html";}
function but8(){parent.f1.location.href="contact.html";}
//GF Firm---------------------------------------------------------------------------------------------------------------------------
function firm(){parent.f1.location.href="firm.html";}
function firm1(){parent.f1.location.href="firmourvalue.html";}
function firm2(){parent.f1.location.href="firmsistcomp.html";}
function firm3(){parent.f1.location.href="firmcontact.html";}
function firm4(){parent.f1.location.href="firmaward.html";}
function firm5(){parent.f1.location.href="contact.html";}
function firm6(){parent.f1.location.href="firm.html";}
function firm7(){parent.f1.location.href="news1.html";}
//Corrugated Cardboard--------------------------------------------------------------------------------------------------------------
function corrugated(){parent.f1.location.href="cardboard.html";}
function corrugated1(){parent.f1.location.href="cardboardproductlist.html";}
function corrugated2(){parent.f1.location.href="cardboardordline.html";}
function corrugated3(){parent.f1.location.href="cardboardhelpcent.html";}
function corrugated4(){parent.f1.location.href="exemple2.html";}
function corrugated5(){parent.f1.location.href="exemple2.html";}
function corrugatedsub(){parent.f1.location.href="importantmilestones.html";}
function corrugatedsub1(){parent.f1.location.href="exemple1.html";}
function corrugatedsub2(){parent.f1.location.href="exemple2.html";}
//Packaging & Services--------------------------------------------------------------------------------------------------------------
function packaging(){parent.f1.location.href="packing.html";}
function packaging1(){parent.f1.location.href="packingservice.html";}
function packaging2(){parent.f1.location.href="packinghelpcenter.html";}
function packaging3(){parent.f1.location.href="packingtotlpackag.html";}
function packaging4(){parent.f1.location.href="packingspeciaoff.html";}
function packaging5(){parent.f1.location.href="packing.html";}
function packaging6(){parent.f1.location.href="packing.html";}
function packaging7(){parent.f1.location.href="packing.html";}
function packagingdsub(){parent.f1.location.href="packing.html";}
function packagingsub1(){parent.f1.location.href="packing.html";}
//Recycling / Love Nature-----------------------------------------------------------------------------------------------------------
function recycling(){parent.f1.location.href="recycling.html";}
function recycling1(){parent.f1.location.href="recyclingplanhist.html";}
function recycling2(){parent.f1.location.href="recyclingenviron.html";}
function recycling3(){parent.f1.location.href="recyclinghelpcent.html";}
function recycling4(){parent.f1.location.href="recycling.html";}
function recycling5(){parent.f1.location.href="recycling.html";}
//Client Portfolio------------------------------------------------------------------------------------------------------------------
function registration(){parent.f1.location.href="client.html";}
function agent(){parent.f1.location.href="client.html";}
function creativework(){parent.f1.location.href="client.html";}
function deliveringservices(){parent.f1.location.href="client.html";}
function newsletter(){parent.f1.location.href="client.html";}
function helpcenter(){parent.f1.location.href="client.html";}
function paymentonline(){parent.f1.location.href="client.html";}
//MouseOver MouseOut HOME Page------------------------------------------------------------------------------------------------------
function mOvergf(){document.getElementById('op1').className=('mbott2w');}
function mOutgf(){document.getElementById('op1').className=('mbott2');}
function mOvercorrugated(){document.getElementById('op2').className=('mbott2w');}
function mOutcorrugated(){document.getElementById('op2').className=('mbott2');}
function mOverpackaging(){document.getElementById('op3').className=('mbott2w');}
function mOutpackaging(){document.getElementById('op3').className=('mbott2');}
function mOverrecycling(){document.getElementById('op4').className=('mbott2w');}
function mOutrecycling(){document.getElementById('op4').className=('mbott2');}
//End of MouseOver MouseOut HOME Page-----------------------------------------------------------------------------------------------

function lp() {document.getElementById('o1').className=('pics');document.getElementById('o2').className=('pixs1');
document.getElementById('o3').className=('pixxs1');document.getElementById('o4').className=('pixxxs1');}
function lpoff() {document.getElementById('o1').className=('pics1');}
function lp1() {document.getElementById('o2').className=('pixs');document.getElementById('o1').className=('pics1');document.getElementById('o3').className=('pixxs1');document.getElementById('o4').className=('pixxxs1');}
function lp1off() {document.getElementById('o2').className=('pixs1');}
function lpp1() {document.getElementById('o3').className=('pixxs');document.getElementById('o1').className=('pics1');
document.getElementById('o2').className=('pixs1');document.getElementById('o4').className=('pixxxs1');}
function lpp1off() {document.getElementById('o3').className=('pixxs1');}
function lpp2() {document.getElementById('o4').className=('pixxxs');document.getElementById('o2').className=('pixs1');
document.getElementById('o1').className=('pics1');document.getElementById('o3').className=('pixxs1');}
function lpp2off() {document.getElementById('o4').className=('pixxxs1');}
function lpp3() {document.getElementById('o5').className=('pixxcs');document.getElementById('o2').className=('pixs1');
document.getElementById('o1').className=('pics1');document.getElementById('o3').className=('pixxs1');
document.getElementById('o4').className=('pixxxs1');}
function lpp3off() {document.getElementById('o5').className=('pixxcs1');}
function divshow(){document.getElementById('r1').innerHTML= "<EMBED WIDTH='552' HEIGHT='234' SRC='swf/GF.swf'menu = 'False'  wmode='transparent'>";
show('test6');}	function closediv()	{hide('test6');}
function divshow1(){document.getElementById('r1').innerHTML= "<EMBED WIDTH='552' HEIGHT='234' SRC='swf/Cardboard.swf'menu = 'False'  wmode='transparent'>";show('test6');}	
function closediv()	{hide('test6');}
function divshow2(){document.getElementById('r1').innerHTML= "<EMBED WIDTH='552' HEIGHT='234' SRC='swf/packaging.swf'menu = 'False'  wmode='transparent'>";show('test6');}	
function closediv()	{hide('test6');}
function divshow3(){
document.getElementById('r1').innerHTML= "<EMBED WIDTH='552' HEIGHT='234' SRC='swf/recycling.swf'menu = 'False'  wmode='transparent'>";
show('test6');}	function closediv()	{hide('test6');}
function divshow4(){
document.getElementById('r1').innerHTML= "<EMBED WIDTH='552' HEIGHT='234' SRC='swf/portfolio.swf'menu = 'False'  wmode='transparent'>";
show('test6');}	function closediv()	{hide('test6');}

function search(){
parent.f1.location.href="search.html";
}

//order on-line
function sendMail(_frm)
{

	if(document.getElementById('fullname').value!="" && document.getElementById('company').value!="" && document.getElementById('phone').value!="" && document.getElementById('email').value!="" && document.getElementById('comment').value!="")
	{
	 if( document.getElementById('email').value.indexOf('@')==-1 || document.getElementById('email').value.indexOf('.')==-1)
	 		{
	    document.getElementById('val').innerHTML="Please enter a valid mail";
		document.getElementById('val').className="txt2";
	 }
	 
	 else
	 
	   {
		var eml="gf@gemayelfreres.com";
		var bod="&body=Full Name: "+document.getElementById('fullname').value+"%0D%0ACompany: "+document.getElementById('company').value+"%0D%0APhone Number: "+document.getElementById('phone').value+"%0D%0AEmail Address: "+document.getElementById('email').value+"%0D%0A %0D%0A"+document.getElementById('comment').value+"%0D%0A%0D%0AThank You";
		var subj="?subject=Order from: "+document.getElementById('company').value;
		location.href="mailto:"+eml+subj+bod;
	   }
	}
	
}
//help center
function sendQ(_frm)
{

	if(document.getElementById('fullname').value!="" && document.getElementById('company').value!="" && document.getElementById('phone').value!="" && document.getElementById('email').value!="" && document.getElementById('comment').value!="")
	{
	 if( document.getElementById('email').value.indexOf('@')==-1 || document.getElementById('email').value.indexOf('.')==-1)
	 		{
	    document.getElementById('val').innerHTML="Please enter a valid mail";
		document.getElementById('val').className="txt2";
	 }
	 
	 else
	 
	   {
		var eml="gf@gemayelfreres.com";
		var bod="&body=Full Name: "+document.getElementById('fullname').value+"%0D%0ACompany: "+document.getElementById('company').value+"%0D%0APhone Number: "+document.getElementById('phone').value+"%0D%0AEmail Address: "+document.getElementById('email').value+"%0D%0A %0D%0A"+document.getElementById('comment').value+"%0D%0A%0D%0AThank You";
		var subj="?subject=Help Center: "+document.getElementById('company').value;
		location.href="mailto:"+eml+subj+bod;
	   }
	}
	
}
function check(event){
var entry =(event.keyCode==0)?event.which:event.keyCode;
if((entry>57)||(entry<48)){
    if(event.keyCode==0)
        event.preventDefault();
    else
        event.returnValue=false;
    }
}

