var dropboxleft=250 //set left position of box (in px)
var dropboxtop=220 //set top position of box (in px)
var dropspeed=25 //set speed of drop animation (larger=faster)
var iPID = 0;
//Specify display mode. 3 possible values are:
//1) "always"- This makes the fade-in box load each time the page is displayed
//2) "oncepersession"- This uses cookies to display the fade-in box only once per browser session
//3) integer (ie: 5)- Finally, you can specify an integer to display the box randomly via a frequency of 1/integer...
// For example, 2 would display the box about (1/2) 50% of the time the page loads.

var displaymode="always"

///Don't edit beyond here///////////

if (parseInt(displaymode)!=NaN)
var random_num=Math.floor(Math.random()*displaymode)
var ie=document.all
var dom=document.getElementById

function initboxvprice(pid){

if (!dom&&!ie)
return
iPID = pid;
crossboxcover=(dom)?document.getElementById("dropinboxvpricecover") : document.all.dropinboxvpricecover
crossbox=(dom)?document.getElementById("dropinboxvprice"): document.all.dropinboxvprice
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
crossbox.height=crossbox.offsetHeight
crossboxcover.style.height=parseInt(crossbox.height)+"px"
crossbox.style.top=crossbox.height*(-1)+"px"
crossboxcover.style.left=dropboxleft+"px"
crossboxcover.style.top=dropboxtop+"px"
crossboxcover.style.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropinvprice()",50)
}

function dropinvprice(){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
if (parseInt(crossbox.style.top)<0){
crossboxcover.style.top=scroll_top+dropboxtop+"px"
crossbox.style.top=parseInt(crossbox.style.top)+dropspeed+"px"
}
else{
clearInterval(dropstart)
crossbox.style.top=0
}
}

function dismissboxvprice(){
if (window.dropstart) clearInterval(dropstart)
crossboxcover.style.visibility="hidden"
}

initboxvpricemulti
function initboxvpricemulti(pid){

if (!dom&&!ie)
return
iPID = pid;
crossboxcover=(dom)?document.getElementById("dropinboxvpricemulticover") : document.all.dropinboxvpricemulticover
crossbox=(dom)?document.getElementById("dropinboxvpricemulti"): document.all.dropinboxvpricemulti
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
crossbox.height=crossbox.offsetHeight
crossboxcover.style.height=parseInt(crossbox.height)+"px"
crossbox.style.top=crossbox.height*(-1)+"px"
crossboxcover.style.left=dropboxleft+"px"
crossboxcover.style.top=dropboxtop+"px"
crossboxcover.style.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropinvpricemulti()",50)
}

function dropinvpricemulti(){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
if (parseInt(crossbox.style.top)<0){
crossboxcover.style.top=scroll_top+dropboxtop+"px"
crossbox.style.top=parseInt(crossbox.style.top)+dropspeed+"px"
}
else{
clearInterval(dropstart)
crossbox.style.top=0
}
}

function dismissboxvpricemulti(){
if (window.dropstart) clearInterval(dropstart)
crossboxcover.style.visibility="hidden"
}



function initboxvmsds(pid){

if (!dom&&!ie)
return
iPID = pid;
crossboxcover=(dom)?document.getElementById("dropinboxvmsdscover") : document.all.dropinboxvmsdscover
crossbox=(dom)?document.getElementById("dropinboxvmsds"): document.all.dropinboxvmsds
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
crossbox.height=crossbox.offsetHeight
crossboxcover.style.height=parseInt(crossbox.height)+"px"
crossbox.style.top=crossbox.height*(-1)+"px"
crossboxcover.style.left=dropboxleft+"px"
crossboxcover.style.top=dropboxtop+"px"
crossboxcover.style.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropinvmsds()",50)
}

function initboxvinfo(pid,ctr){
    document.getElementById("spnfeatdesc").innerHTML = aInfo[ctr-1]
    if (!dom&&!ie)
    return
    iPID = pid;
    crossboxcover=(dom)?document.getElementById("dropinboxvmsdscover1") : eval('document.all.dropinboxvmsdscover1')
    crossbox=(dom)?document.getElementById("dropinboxvmsds1"): eval('document.all.dropinboxvmsds1')
    scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
    crossbox.height=crossbox.offsetHeight
    crossboxcover.style.height=parseInt(crossbox.height)+"px"
    crossbox.style.top=crossbox.height*(-1)+"px"
    crossboxcover.style.left=dropboxleft+"px"
    crossboxcover.style.top=dropboxtop+"px"
    crossboxcover.style.visibility=(dom||ie)? "visible" : "show"
    dropstart=setInterval("dropinvmsds()",50)
}




function dropinvmsds(){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
if (parseInt(crossbox.style.top)<0){
crossboxcover.style.top=scroll_top+dropboxtop+"px"
crossbox.style.top=parseInt(crossbox.style.top)+dropspeed+"px"
}
else{
clearInterval(dropstart)
crossbox.style.top=0
}
}

function dismissboxvmsds(){
if (window.dropstart) clearInterval(dropstart)
crossboxcover.style.visibility="hidden"
}
function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = ""
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
/*
if (displaymode=="oncepersession" && get_cookie("droppedinvprice")=="" || displaymode=="always" || parseInt(displaymode)!=NaN && random_num==0){
if (window.addEventListener) window.addEventListener("load", initboxvprice, false)
else if (window.attachEvent) window.attachEvent("onload", initboxvprice)
else if (document.getElementById || document.all) window.onload=initboxvprice
if (displaymode=="oncepersession") document.cookie="droppedinvprice=yes"
}
*/
function init(){
	document.onmouseup = getXY;
}


function getXY(e){
	/*
	xObj = frmCurrForm.elements["btnLockUnlock"];
	//xObj = e
	strAa = ""
	for (aa in xObj){
		if (xObj[aa]){
		strAa += aa +'='+ xObj[aa]+ '\n';
		}
	}
	//alert(strAa);
	//*/

	if (!e) e = window.event;
	//alert(e.clientY);
	dropboxtop = e.clientY - 32;
}

function initboxvbudgetprice(pid){

if (!dom&&!ie)
return
iPID = pid;
crossboxcover=(dom)?document.getElementById("dropinboxvbudgetcover") : document.all.dropinboxvbudgetcover
crossbox=(dom)?document.getElementById("dropinboxvbudgetprice"): document.all.dropinboxvmsds
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
crossbox.height=crossbox.offsetHeight
crossboxcover.style.height=parseInt(crossbox.height)+"px"
crossbox.style.top=crossbox.height*(-1)+"px"
crossboxcover.style.left=dropboxleft+"px"
crossboxcover.style.top=dropboxtop+"px"
crossboxcover.style.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropinvbudget()",50)
}

function dropinvbudget(){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
if (parseInt(crossbox.style.top)<0){
crossboxcover.style.top=scroll_top+dropboxtop+"px"
crossbox.style.top=parseInt(crossbox.style.top)+dropspeed+"px"
}
else{
clearInterval(dropstart)
crossbox.style.top=0
}
}

function dismissboxvbudgetprice(){
if (window.dropstart) clearInterval(dropstart)
crossboxcover.style.visibility="hidden"
}

function displaybudgetprice(){
	initboxvbudgetprice(100)
}

function displayprice(){
	initboxvprice(100)
}
function displaypricemulti(){
	initboxvpricemulti(100)
}
function displaymsdsinfo(tag){
	if (tag == 1)
		initboxvmsds(102)
		
}
