// JavaScript Document
//   popup script //
 function popupwin(light, fade)
 {
	  document.getElementById(light).style.display='block';
	var frame = document.getElementById(fade);
	var htmlheight = document.body.parentNode.scrollHeight;
	var myWidth = 0, myHeight = 0;
		 if( typeof( window.innerWidth ) == 'number' )
		 {
			 myWidth = window.innerWidth;
			 myHeight = window.innerHeight;
		 }
		 else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
		 {
		 //IE 6+ in 'standards compliant mode'
			 myWidth = document.documentElement.clientWidth;
			 myHeight = document.documentElement.clientHeight;
		 }
		 else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
		 {
			 myWidth = document.body.clientWidth;
			 myHeight = document.body.clientHeight;
		 }
		 		
		 if ( htmlheight < myHeight )
		 {
			 var frameheight = myHeight + "px";
			 frame.style.height = frameheight;
			 document.body.style.height = frameheight;
			 frame.style.width = myWidth;
		 }
		 else
		 {
			 var frameheight = htmlheight + "px";
			 frame.style.height = frameheight;
			 document.body.style.height = frameheight;
			 frame.style.width = myWidth;
		 }
			
			if(light=="light6")
			{
				 frame.style.height = "3400px";
			}
			if(light=="light12")
			{
				 frame.style.height = "1600px";
			}
			if(light=="light10")
			{
				 frame.style.height = "1400px";
			}
			if(light=="light11")
			{
				 frame.style.height = "1400px";
			}
			if(light=="light13")
			{
				 frame.style.height = "2600px";
			}
	var scrOfY;
  		scrOfY=0;
		document.getElementById(fade).style.display='block';
	 if( typeof( window.pageYOffset ) == 'number' ) {
				//Netscape compliant
				scrOfY = window.pageYOffset;
			  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
				//DOM compliant
				scrOfY = document.body.scrollTop;
			  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
				//IE6 standards compliant mode
				scrOfY = document.documentElement.scrollTop;
			  }
			document.getElementById('svalue').value=scrOfY;
			self.scroll(0,0);
 }
 
 
 function rewrite_popupwin(light,fade)
 {
	  document.getElementById(light).style.display='block';
	var frame = document.getElementById(fade);
	var htmlheight = document.body.parentNode.scrollHeight;
	var myWidth = 0, myHeight = 0;
		 if( typeof( window.innerWidth ) == 'number' )
		 {
			 myWidth = window.innerWidth;
			 myHeight = window.innerHeight;
		 }
		 else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
		 {
		 //IE 6+ in 'standards compliant mode'
			 myWidth = document.documentElement.clientWidth;
			 myHeight = document.documentElement.clientHeight;
		 }
		 else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
		 {
			 myWidth = document.body.clientWidth;
			 myHeight = document.body.clientHeight;
		 }

		 if ( htmlheight < myHeight )
		 {
			 var frameheight = myHeight + "px";
			 frame.style.height = frameheight;
			 document.body.style.height = frameheight;
		 }
		 else
		 {
			 var frameheight = htmlheight + "px";
			 frame.style.height = frameheight;
			 document.body.style.height = frameheight;
		 }

			 
	 //document.getElementById(fade).style.display='block';
 }
 
 
 
 
 function popupclose(whylight,fade,playerId)
 {
 document.getElementById(whylight).style.display='none';
 document.getElementById(fade).style.display='none';
 document.getElementById(playerId).innerHTML="";
 }
 // End here //
 
 
 // Expand collapse Script //
 
 // End here //

//  Tab Navigation //
function showTabData(dataId,selTabId,unselTabId,containerId)
{
    document.getElementById(selTabId).className = 'sel';
	document.getElementById(unselTabId).className = '';
	document.getElementById(containerId).innerHTML = document.getElementById(dataId).innerHTML;
}

function showVideo(playerId,flvFile)
{
				var so = new SWFObject("/flash/mpw_player.swf", "swfplayer", "339", "281", "9", "#000000");
				so.addVariable("flv", flvFile);
				so.addParam("allowFullScreen","true");
				so.addParam("autoplay","true");
				so.addVariable("backcolor","2D2D2D");
				so.addParam("wmode", "transparent");
				so.addVariable("frontcolor","FFFFFF");
				so.write(playerId);
;
}

function changeTxtBxAttr(status){
	if(status == 1)
	{
		if(document.getElementById('searchBox').value=='Search') {document.getElementById('searchBox').value='';}; 
		document.getElementById('searchBox').className ='searchVal width175';
	}
	else{
		document.getElementById('searchBox').value='Search'; 
		document.getElementById('searchBox').className = 'inputBrdNone width175';	
	}
}
function mvHide()
{
	document.getElementById('home').style.visibility = "hidden";
}



function mvClose(mvlight,fade1,flvplayer)
{
	document.getElementById(mvlight).style.display='none';
	 document.getElementById(fade1).style.display='none';
	 document.getElementById('if1').src="preloader.html";
}

function hidedrop(dispwht)
{
	if(dispwht=="1")
	{
		document.getElementById('stateDD').style.display='none';
		document.getElementById('cityDD').style.display='none';
	}
	else
	{
		document.getElementById('stateDD').style.display='block';
		document.getElementById('cityDD').style.display='block';

	}
}

 function popupcloseWoID(whylight,fade)
 {
 document.getElementById(whylight).style.display='none';
 document.getElementById(fade).style.display='none';
 }


 function popupwin_movies(light, fade,moviename)
 {
	document.getElementById(light).style.display='block';
	var frame = document.getElementById(fade);
	var htmlheight = document.body.parentNode.scrollHeight;
	var myWidth = 0, myHeight = 0;
		 if( typeof( window.innerWidth ) == 'number' )
		 {
			 myWidth = window.innerWidth;
			 myHeight = window.innerHeight;
		 }
		 else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
		 {
		 //IE 6+ in 'standards compliant mode'
			 myWidth = document.documentElement.clientWidth;
			 myHeight = document.documentElement.clientHeight;
		 }
		 else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
		 {
			 myWidth = document.body.clientWidth;
			 myHeight = document.body.clientHeight;
		 }
		 		
		 if ( htmlheight < myHeight )
		 {
			 var frameheight = myHeight + "px";
			 frame.style.height = frameheight;
			 document.body.style.height = frameheight;
			 frame.style.width = myWidth;
		 }
		 else
		 {
			 var frameheight = htmlheight + "px";
			 frame.style.height = frameheight;
			 document.body.style.height = frameheight;
			 frame.style.width = myWidth;
		 }
	
		
		if(light=="light12")
		{
			 frame.style.height = "1600px";
		}
		if(light=="light10")
		{
			 frame.style.height = "1400px";
		}
		if(light=="light11")
		{
			 frame.style.height = "1400px";
		}
		if(light=="light13")
		{
			 frame.style.height = "2600px";
		}

	document.getElementById(fade).style.display='block';
	document.getElementById('if1').src=moviename;
	
	
	
if( typeof( window.pageYOffset ) == 'number' ) {
				//Netscape compliant
				scrOfY = window.pageYOffset;
			  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
				//DOM compliant
				scrOfY = document.body.scrollTop;
			  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
				//IE6 standards compliant mode
				scrOfY = document.documentElement.scrollTop;
			  }
			document.getElementById('svalue').value=scrOfY;
			self.scroll(0,0);
 }
 
 
 function vdo_close(flvplayer1)
 {
	document.getElementById(flvplayer1).style.display='none';
 }
 
 function imgHover(img_name, img_src)
   {
   document.getElementById(img_name).src = img_src;
   }


	
	function changeimage(img_name,div_name)
   {
	   str=document.getElementById(img_name).src;
	   str1="collapse_icon.gif";
	   str2=str.indexOf(str1);
	   if(str2 != "-1")
	   {
	   document.getElementById(img_name).src="images/expand_icon.gif";
	   document.getElementById(div_name).style.display="block";
	   /*var frame1 = document.getElementById('fade6');
		var divh = document.getElementById("fade6").clientHeight;
		if(divh >1350)
		{
		   frame1.style.height=divh + 200 + "px";
		}*/
	   
	   }
	   else
	   {
	   document.getElementById(img_name).src ="images/collapse_icon.gif";
	   document.getElementById(div_name).style.display="none";
	   }
	   
	   
	   
   }
function collapseall(divnum)
{
	for(i=1; i<=divnum; i++)
		{
			document.getElementById("sub" + i).style.display="none";
			document.getElementById("isub" + i).src="images/collapse_icon.gif";
		}
		/*var frame1 = document.getElementById('fade6');
		frame1.style.height="1350px";*/
}
function expandall(divnum)
{
	
	for(i=1; i<=divnum; i++)
		{
			document.getElementById("sub" + i).style.display="block";
			document.getElementById("isub" + i).src="images/expand_icon.gif";
		}
		/*var frame1 = document.getElementById('fade6');
		var divh = document.getElementById("container").clientHeight;
		frame1.style.height=divh + 250 + "px";*/
}


function colall(divnum)
{
	for(i=1; i<=divnum; i++)
		{
			document.getElementById("hdsub" + i).style.display="none";
			document.getElementById("hdisub" + i).src="images/collapse_icon.gif";
		}
		/*var frame1 = document.getElementById('fade6');
		frame1.style.height="1700px";*/
}
function expall(divnum)
{

	for(i=1; i<=divnum; i++)
		{
			document.getElementById("hdsub" + i).style.display="block";
			document.getElementById("hdisub" + i).src="images/expand_icon.gif";
		}
		/*var frame1 = document.getElementById('fade6');
		var divh = document.getElementById("container").clientHeight;
		frame1.style.height=divh + 250 + "px";*/
}


function clicktab(tabId,contantId,hideTabId,hidecontantId)
	{
		document.getElementById(tabId).className= "sel";
		document.getElementById(contantId).style.display = "block";

		if(hideTabId.length > 0)
		{
			for (var i=0; i<hideTabId.length; i++)
			{
				document.getElementById(hidecontantId[i]).style.display = "none";
				document.getElementById(hideTabId[i]).className= "";
			}

		}
	}
	

