﻿function LaunchPop(url, width, height, scrollbars)
{
    if (arguments.length == 3) {
        scrollbars = 0;
    }
    var pop = window.open(url,"pop","top=0,left=0,width="+ width +",height="+ height +",scrollbars="+scrollbars);
	pop.focus();	
}

function makevisible(cur,which){
    strength = (which == 0)? 1 : 0.6

    if (cur.style.MozOpacity){
        cur.style.MozOpacity = strength
    }else if (cur.filters){
        cur.filters.alpha.opacity = strength*100
    }
}

function ShowModal(divtoshow)
{
    //darken the body
    var theBody = document.getElementsByTagName('BODY')[0];
	var popmask = document.createElement('div');
	popmask.id = 'popupMask';
    theBody.appendChild(popmask);
    
	popmask.style.height = '1000px';
	popmask.style.width = theBody.scrollWidth;
    
    var panel = document.getElementById(divtoshow);
    // w is a width of the newsletter panel
    w = 538;
    // h is a height of the newsletter panel
    h = 363;
    // get the x and y coordinates to center the newsletter panel
    xc = Math.round((document.body.clientWidth/2)-(w/2))
    yc = Math.round((document.body.clientHeight/2)-(h/2))
    // show the newsletter panel
    panel.style.left = xc + "px";
    panel.style.top = "202px";
    panel.style.display = 'inline';
    
    openFlash(divtoshow);
    
}
 
function openFlash(id)
{
   eval('window.document.vid' + id).Play();
  // var panel = document.getElementById('vid' + id);
  // panel.style.display = 'inline';
   
    
}







