            

function Call(previewlink,producttitle,sku,division,culture,Media)
{		
   var url ="";
 url = "http://ecom.coastal.com/FullPreviewFull.aspx?pl=" + previewlink+ "&Previewtype=Full Preview&ProdTitle=" +  producttitle  +"&SKU=" + sku + "&Division=" + division+"&Culture="+culture+"&Media="+Media ; 

openCenteredWindow(url);		
	return false;
}

var cm=null;
document.onclick = new Function("show(null)")
function findPos(obj) 
{

var curleft = curtop = 0;

if (obj.offsetParent) { 
curleft = obj.offsetLeft

curtop = obj.offsetTop

while (obj = obj.offsetParent) { 
curleft += obj.offsetLeft

curtop += obj.offsetTop

}

}

//alert(curleft + " " + curtop);
return [curleft,curtop]; 
}
//habeeba	
function show(el,m) 
{
m=document.getElementById(m);
if (m)
 {

 el.style.cursor='pointer';	
 m.style.cursor='pointer';		
 m.style.display=''	
 //m.style.visibility='visible'	

 var myObj = el;
var pos = findPos(myObj);

///alert(m.id.indexOf("Productswmv"));
if(m.id.indexOf("Productswmv")!=-1) 
		{

				m.style.top=pos[1]+el.height; 
				m.style.right=pos[0];
//alert(pos[0]);

						m.style.top=pos[1]+el.height;  
				m.style.right=260;
m.style.top=pos[1]+el.height+"px"; 
m.style.left=pos[0]+"px";
		}

if(m.id.indexOf("Productsflv")!=-1) 
				{
			
				m.style.top=pos[1]+el.height+"px"; 
m.style.left=pos[0]+"px";
				}

if(m.id.indexOf("Productsint")!=-1) 
				{
			
				m.style.top=pos[1]+el.height+"px"; 
m.style.left=pos[0]+"px";
				}	

}
	if ((m!=cm) && (cm)) cm.style.display='none'
	cm=m
}
  //habeeba
function CallPreviews(me,param,productTitle,paramSKU,paramDivision,paramCulture,paramMedia)
{	
	var ParamSeries="Yes";
	var url="http://ecom.coastal.com/FullPreviewFull.aspx?pl=" + param + "&Previewtype=Full Preview&ProdTitle=" +  productTitle  + "&sku=" + paramSKU  + "&Division=" + paramDivision + "&culture=" + paramCulture+"&Media="+paramMedia+"&series="+ParamSeries; 		  				 

	openCenteredWindow(url) ;
	 return false;
}

// lavanya
function ShowInfo(productTitle,paramSKU,paramDivision,paramCulture)
{
var url="http://ecom.coastal.com/ProductDetails.aspx?sku=" + paramSKU  + "(CoastalU)&Division=" + paramDivision + "&culture=" + paramCulture+"&INFO=1"; 		  				 
openCenteredPWindow(url) ;
return false;    
}
// lavanya
	
	function openCenteredPWindow(url) 
{
    var width = 800;
    var height = 840;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
//    var windowFeatures = "width=" + width + ",height=" + height + ",resizable='no',left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top+",titlebar=0";
   var windowFeatures = "width=" + width + ",height=" + height + ",resizable=1,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top+",titlebar=0,scrollbars=1";
    //alert(windowFeatures);
    myWindow = window.open(url, "subWind", windowFeatures);
}	
	

	function openCenteredWindow(url) 
{
    var width = 600;
    var height = 640;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var windowFeatures = "width=" + width + ",height=" + height + ",resizable='no',left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top+",titlebar=0";
    //alert(windowFeatures);
    myWindow = window.open(url, "subWind", windowFeatures);
}
	 
	
function closes(el,m)
{
if (!e) var e = window.event;
	var relTarg = e.relatedTarget || e.toElement;
	if(relTarg!=null)
{

if (relTarg.id!="")
	{
m=document.getElementById(m);
	m.style.display='none' 		
 	}
}
}         

 
              