﻿// JScript File
// JScript File
//   Open Win ----------------------
function Openwin(URL,w,h) {
	TxtParm = "width= " + w + ",height=" + h + ",left=300,top=100,resizable=yes,status=no,scrollbars=yes,toolbar=no,menubar=yes"
	window.open(URL,"shockscreen",TxtParm);
}	

//--------- VIEW SWF ------
function swf(src,w,h)
{
		ht = "	<OBJECT codeBase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'   ";
		ht += "	height='" + h + "' width='" + w + "' align='middle' VIEWASTEXT>";
		ht += "	<PARAM NAME='movie' VALUE='" + src + "'> ";
		ht += "	<PARAM NAME='quality' VALUE='best'>  ";
		ht += "	<PARAM NAME='wmode' VALUE='transparent'>  ";
		ht += "	<embed src='" + src + "' quality='best' wmode='transparent' height='" + h + "' width='" + w + "'   ";
		ht += "	align='middle' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /> ";
		ht += "  </OBJECT> ";
		document.write(ht);
}

//----------- View Menu ------------
//function Show(Item,Switch) {
//	var Index,docwidth,docheight;
//	if (Switch)
//	{
//	
//        Closemenu();
//	    if (window.innerWidth || window.innerHeight)
//	    {
//	      docwidth = window.innerWidth;
//	      docheight = window.innerHeight;       
//	      }

//	    if (document.body.clientWidth || document.body.clientHeight)
//	    { 
//	        docwidth = document.body.clientWidth;
//	        docheight = document.body.clientHeight;
//	    }
//		document.getElementById(Item + "menu").style.left = parseInt((parseInt(docwidth) - 961 ) /2 + 759) ;
//		document.getElementById(Item + "menu").style.display = 'block';		
//		}	
//	else
//		//document.getElementById(Item + "menu").innerHTML = "";	
//		document.getElementById(Item + "menu").style.display = 'none';	
//	return
//}
////----------- View Top Menu ------------

//function Showmenu(Item,Switch,widths) {
//	var Index,docwidth,docheight;	
//	if (Switch == 1 )
//	{ 	 
//	    Closemenu(); 	   	   	
//	    if (window.innerWidth || window.innerHeight)
//	    {
//	        docwidth = window.innerWidth;
//	        docheight = window.innerHeight; 
//	    }

//	    if (document.body.clientWidth || document.body.clientHeight)
//	    { 
//	        docwidth = document.body.clientWidth;
//	        docheight = document.body.clientHeight;
//	    }
//		    document.getElementById(Item + "menu").style.left = parseInt((parseInt(docwidth) - 961 ) /2 + (961 - widths)) ;	
//		  //  alert(document.getElementById(Item + "menu").style.left);	      		    
//		    document.getElementById(Item + "menu").style.display = 'block';		
//		}	
//	else
//		document.getElementById(Item + "menu").style.display = 'none';			
//	return
//}

//function Closemenu()
//{   
//	 //--------------
//	   document.getElementById("Aboutmenu").style.display = 'none';	
//	   document.getElementById("Carmenu").style.display = 'none';	
//	   document.getElementById("Dieselmenu").style.display = 'none';	
//	   document.getElementById("Servicemenu").style.display = 'none';		   
//	   //---------		     
//	   if (document.getElementById("Historymenu"))
//	        document.getElementById("Historymenu").style.display = 'none';
//	        
//	   if (document.getElementById("ProjectEnvironmentmenu"))
//	        document.getElementById("ProjectEnvironmentmenu").style.display = 'none';	     
//	        
//	   if (document.getElementById("Agencymenu"))
//	        document.getElementById("Agencymenu").style.display = 'none';	        
//	           	       
//	   if (document.getElementById("Garantymenu"))
//    	    document.getElementById("Garantymenu").style.display = 'none';	   	 
//    	    
//	   if (document.getElementById("Productmenu"))
//    	    document.getElementById("Productmenu").style.display = 'none';	      	    
//     
//}


//function showswfproduct(Item,Id,Vehicle,Count)
//{   

//    var isSelection = Item + "menu.swf" ;                       
//    
//    var QTObjStr ,i;  
//    QTObjStr = "<span></span>";    
////    for (i = 5 ; i< Count  ; i ++)
////    {
////       QTObjStr += "<span></span>"
////   }
//    if (Count > 9) 
//        Count = 9;
//     
//    if (Vehicle == 1 ) 
//    {    
//        QTObjStr += "<object width='350' height='120'  >" +        
//        "<param name='controller' value='TRUE' />" +
//        "<param name='type' value='video/quicktime' />" +
//        "<param name='autoplay' value='true' />" +
//        "<param name='scale' value='tofit' />" +
//	    //"<param name='wmode' VALUE='transparent'>  " + 
//        "<param name='SRC' value='"+isSelection+"' />" +
//        "<param name='pluginspage' value='http://www.apple.com/quicktime/download/indext.html' />" +
//	    "<embed src='" + isSelection + "' quality='best'  height='120' width='350' style='position:relative;top:" + (Count*20) + "px;' " +
//	    "	 type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /> " +
//        "</object>" 
//    }
//    else if (Vehicle == 2)
//    {
//        QTObjStr += "<object width='350' height='120'  >" +        
//        "<param name='controller' value='TRUE' />" +
//        "<param name='type' value='video/quicktime' />" +
//        "<param name='autoplay' value='true' />" +
//        "<param name='scale' value='tofit' />" +
//	    //"<param name='wmode' VALUE='transparent'>  " + 
//        "<param name='SRC' value='"+isSelection+"' />" +
//        "<param name='pluginspage' value='http://www.apple.com/quicktime/download/indext.html' />" +
//	    "<embed src='" + isSelection + "' quality='best'  height='120' width='350' style='position:relative;'" +
//	    "	 type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /> " +
//        "</object>" 
//    }
//    
//    var items = "swfprod" + Vehicle;

//   document.getElementById(items).innerHTML = QTObjStr ;  
//   if (document.getElementById(items).innerHTML== "")
//   {
//         isSelection = Item + "menu.jpg" ;  
//         document.getElementById(items).innerHTML = "<img src='"+isSelection+"' alt='products' id='products' />"
//   }
//   
//   document.getElementById(items).style.display="block";         
//   document.getElementById(Id).style.background = "#e3e3e3";   

//}

////-------------------------

//function ClosemenuProduct()
//{   
//	 //--------------
//	   document.getElementById("Aboutmenu").style.display = 'none';	
//	   document.getElementById("Carmenu").style.display = 'none';	
//	   document.getElementById("Dieselmenu").style.display = 'none';	
//	   document.getElementById("Servicemenu").style.display = 'none';		   
//	   //---------		     
//	   if (document.getElementById("Historymenu"))
//	        document.getElementById("Historymenu").style.display = 'none';
//	        
//	   if (document.getElementById("ProjectEnvironmentmenu"))
//	        document.getElementById("ProjectEnvironmentmenu").style.display = 'none';	     
//	        
//	   if (document.getElementById("Agencymenu"))
//	        document.getElementById("Agencymenu").style.display = 'none';	        
//	           	       
//	   if (document.getElementById("Garantymenu"))
//    	    document.getElementById("Garantymenu").style.display = 'none';	   	 
//    	    
//	//   if (document.getElementById("Productmenu"))
//    //	    document.getElementById("Productmenu").style.display = 'none';	      	    
//     
//}

////----------  Set Style menu
////        function SetStyle(ObjectID,DcWidth)
////        {
////        if (window.innerWidth || window.innerHeight)
////        {
////          docwidths = window.innerWidth;
////          docheights = window.innerHeight; 
////          }

////        if (document.body.clientWidth || document.body.clientHeight)
////        { 
////        
////        docwidths = document.body.clientWidth;
////        docheights = document.body.clientHeight;
////        }
////        document.getElementById(ObjectID).style.left = (parseInt(docwidths) - 961 ) /2;
////        alert(document.getElementById(ObjectID).style.left);
////        }
////        
////           

//function OpenChild()
//{

////var ParmA = retvalA.value;
////var ParmB = retvalB.value;
////var ParmC = retvalC.value;
////var MyArgs = new Array(ParmA, ParmB, ParmC);
//var WinSettings = "center:yes;resizable:no;dialogHeight:200px;dialogwidth:250px"
//// ALTER BELOW LINE - supply correct URL for Child Form
//var MyArgs = window.showModalDialog("newsletter.aspx",WinSettings);
////if (MyArgs == null)
////{
////window.alert("Nothing returned from child. No changes made to input boxes");
////}
////else
////{
////retvalA.value=MyArgs[0].toString();
////retvalB.value=MyArgs[1].toString();
////retvalC.value=MyArgs[2].toString();
////}
//}

