var Height=638; var Width=750; var showInPage="Everytime"; ifvId="4"; function setIFVParams() { position="RightBottom"; Duration="30"; userHeight=638; userWidth=750; showInPage="Everytime"; var browserWidth = 0, browserHeight = 0; ifvId="4"; if(ifvId=='64') { if ( window.populate) populate(); } if( typeof( window.innerWidth ) == 'number' ) { browserWidth = window.innerWidth; browserHeight = window.innerHeight; }else if(document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' browserWidth = document.documentElement.clientWidth; browserHeight = document.documentElement.clientHeight; }else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible browserWidth = document.body.clientWidth; browserHeight = document.body.clientHeight; } if(position=='LeftTop') { x=0; y=0; } else if(position=='LeftBottom') { x=0; y=browserHeight-userHeight; } else if(position=='RightBottom') { x=browserWidth-(userWidth+20); y=browserHeight-userHeight; } else if(position=='RightTop') { x=browserWidth-userWidth; y=0; } else if(position=='CenterTop') { x=(browserWidth/2)-(userWidth/2); y=0; } else if(position=='CenterBottom') { x=(browserWidth/2)-(userWidth/2); y=browserHeight-userHeight; } else if(position=='Center') { x=(browserWidth/2)-(userWidth/2); y=(browserHeight/2)-(userHeight/2); } CloseApp(); strCode = ' '; newDiv = document.createElement("div"); newDiv.id="divIntroFlash"; newDiv.name="divIntroFlash"; newDiv.style.width=Width; newDiv.style.height=Height; newDiv.style.position="absolute"; newDiv.style.left=x + "px"; newDiv.style.top=y + "px"; newDiv.innerHTML = strCode; document.body.appendChild(newDiv); if (ie||ns4||ns6) window.onscroll =fnRelocateIntroFalsh; if(".flv"==".swf") { setTimeout("CloseApp()",Duration*1000); } } /*---------------------------------Function end here---------------*/ /*-----------------------function to get and set cookies------*/ function getCookie(c_name) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "=") if (c_start!=-1) { c_start=c_start + c_name.length+1 c_end=document.cookie.indexOf(";",c_start) if (c_end==-1) c_end=document.cookie.length return unescape(document.cookie.substring(c_start,c_end)) } } return "" } function setCookie(c_name,value,expiredays) { var exdate=new Date() exdate.setDate(exdate.getDate()+expiredays) document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString()) } /*-------------------------This function is called from falsh to close the div-------------*/ function removeElement(divNum) { var d = document.getElementById('divIntroFlash'); var olddiv = document.getElementById(divNum); d.removeChild(olddiv); } function fnRelocateIntroFalsh() { //alert(document.body.scrollTop); h=10; isIntroLoaded = true; if (isIntroLoaded) { if(yon==0) { YY=YY-xstep; } else { YY=YY+xstep; } if (ie) { ch=document.body.clientHeight; oh=document.getElementById("divIntroFlash").offsetHeight; } else if (ns6) { ch=window.innerHeight oh=document.getElementById("divIntroFlash").offsetHeight } if(YY<0) { yon=1;YY=0; } if(YY>=(ch-oh)) { yon=0;YY=(ch-oh); } //alert(document.body.scrollTop); document.getElementById("divIntroFlash").style.top = document.body.scrollTop + y; } } function CloseApp() { e=document.getElementById("divIntroFlash"); var b = document.body; try { //b.removeChild(e); //document.getElementById("divIntroFlash").style.display = "none"; } catch(arr) { alert('eror.'+arr); } } if(showInPage=='Once'){ showInpage=getCookie(ifvId) if(showInpage=="") { setCookie(ifvId,'true',365); window.onload=setIFVParams; } }else if(showInPage=='Everytime'){ window.onload=setIFVParams; } /*-----------------------Scrollig code----------*/ var flashWidth = 300; var flashPlayTime = 128; var XX=20; // X position of the scrolling objects var xstep=0; var delay_time=1; var play_time=0; var isIntroLoaded = false; //Begin of the unchangable area, please do not modify this area var YY=0; var ch=0; var oh=0; var yon=0; var ns4=document.layers?1:0 var ie=document.all?1:0 var ns6=document.getElementById&&!document.all?1:0 //alert(ns6); if(ie) { YY=document.body.clientHeight; YY = YY -70; XX=document.body.clientWidth; XX = XX-flashWidth -5; //divIntroFlash.style.top=YY; //divIntroFlash.style.left=XX; } else if (ns6) { YY=window.innerHeight; YY = YY -70; XX=window.innerWidth; XX = XX- flashWidth - 10; //alert(XX); //alert(YY); //document.getElementById('divIntroFlash').style.top=YY; //document.getElementById('divIntroFlash').style.left=XX; }