//var currentPath = this.location.protocol + "//" + this.location.hostname + ":" + this.location.port;
//alert(this.location.hostname.substr(0,6));
//if (this.location.hostname.substr(0,6) == "auxdev") {
 //   currentPath = currentPath + "/Fire";
  //  }
//alert(currentPath);



function rollo1(imgobj,ind,srctg) {
        srcloc = currentPath + "global_nav/universal/nav_b_"+ind+"_"+srctg+".gif";
        imgobj.src = srcloc;
        }
        
function rollo2(imgobj,srctg) {
        srcloc = currentPath + "global_nav/blue/nav_"+srctg+".gif";
        imgobj.src = srcloc;
        }

function rollo2a(imgobj,srctg) {
        srcloc = currentPath +  "shop/shop_nav_"+srctg+".gif";
        imgobj.src = srcloc;
        }
        
function rollo2b(imgobj,srctg) {
        srcloc = currentPath + "shop/weekly_ad_"+srctg+".gif";
        imgobj.src = srcloc;
        }
        
function rollo3(imgobj,srctg) {
        srcloc = currentPath + "global_nav/universal/btn_go_"+srctg+".gif";
        imgobj.src = srcloc;
        }

function rollo3a(imgobj,srctg) {
        srcloc = currentPath + "all_buttons/btn_go_"+srctg+".gif";
        imgobj.src = srcloc;
        }
        
function rollo4(imgobj,srctg) {
        srcloc = currentPath + "global_nav/universal/add_to_cart_"+srctg+".gif";
        imgobj.src = srcloc;
        }
        
function rollo4a(imgobj,srctg) {
        srcloc = currentPath + "all_buttons/view_details_"+srctg+".gif";
        imgobj.src = srcloc;
        }
        
function rollo5(imgobj,srctg) {
        srcloc = currentPath + "home/home_blue/weekly_ad_"+srctg+".gif";
        imgobj.src = srcloc;
        }
        
function rollo6(imgobj,srctg) {
        srcloc = currentPath + "global_nav/universal/"+srctg+".gif";
        imgobj.src = srcloc;
        }
        
function rollo7(imgobj,srctg) {
        srcloc = currentPath + "global_nav/universal/"+srctg+".gif";
        imgobj.src = srcloc;
        }
        
function writeVWin(imgsrc,h,w) {
        wintxt = "<HTML><HEAD><TITLE>View</TITLE><BODY leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor='#FFFFFF'>";
        wintxt += "<TABLE width='100%' border='0' cellspacing='0' cellpadding='0' bgcolor='#FFFFFF'>";
        wintxt += "<TR><TD align='right'><a href='javascript:this.window.close()'><img src='"+currentPath +"/popup/popup_close.gif' border=0></a></TD></TR>";
        wintxt += "<TR><TD align='right'><img src='"+ currentPath + imgsrc+"' height="+h+" width="+w+"></TD></TR>";
        wintxt += "</TABLE></BODY></HTML>";
        winh = h + 19;
        options = "top=100,left=100,status=no,filemenu=no,resizeable=no,toolbars=no,height="+winh+",width="+w;
        VarWin = window.open('/common/js/loading.html', 'VarWin',options); 
        top.VarWin.document.open();
        top.VarWin.document.write(wintxt);
        top.VarWin.document.close(); 
	top.VarWin.focus();
        }

function writeVWinMV(imgsrc,h,w) {
        wintxt = "<HTML><HEAD><TITLE>View</TITLE></HEAD><BODY leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor='#ffffff'>";
        wintxt += "<TABLE width='100%' border='0' cellspacing='0' cellpadding='0'>";
        wintxt += "<TR><TD align='right'><img src='"+ currentPath + imgsrc+"' height="+h+" width="+w+"></TD></TR>";
        wintxt += "<TR><TD align='right' bgcolor='#ffffff'><a href='javascript:this.window.close()'><img src='"+currentPath +"/popup/popup_close.gif' border=0></a></TD></TR>";
        wintxt += "</TABLE></BODY></HTML>";
        winh = h + 19;
        options = "top=100,left=100,status=no,filemenu=no,resizeable=no,toolbars=no,height="+winh+",width="+w;
        VarWin = window.open('/common/js/loading.html', 'VarWin',options);
        top.VarWin.document.open();
        top.VarWin.document.write(wintxt);
        top.VarWin.document.close();
        VarWin.focus();
        }
        
function gotoLink(frm)
{
location.href=frm.listbox.options[frm.listbox.selectedIndex].value
}

function openRadioLink()
{
var windowName = self.name;
if (windowName == '') {
	self.name = escape('LaunchRadioTarget');
}
windowName = self.name;
var radiowin = window.open('/target_group/whats_new/target_radio.jhtml', 'playerWindow', 'HEIGHT=320,WIDTH=468');
}

function openSonyLink()
{
var windowName = self.name;
if (windowName == '') {
	self.name = escape('LaunchSonyTarget');
}
windowName = self.name;
var sonywin = window.open('http://www.sel.sony.com/SEL/consumer/ss5/dealers/dealerinfo/target.html', 'sonyWindow', 'toolbar=no,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,width=400,height=300,top=20,left=20'); 
}

function openSonyLegalLink()
{
var windowName = self.name;
if (windowName == '') {
	self.name = escape('LaunchSonyLegal');
}
windowName = self.name;
var sonylegalwin = window.open('http://www.sel.sony.com/SEL/legal/notice.html', 'sonyLegalWindow', 'toolbar=no,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,width=400,height=300,top=20,left=20'); 
}

function openNetflixLink(linkType)
{
var windowName = self.name;
if (windowName == '') {
	self.name = escape('LaunchNetflixTarget');
}
windowName = self.name;
var URL = "/target_group/alliances/netflix_interstitial.jhtml?netflixCat=" + linkType;
var netflixwin = window.open(URL, 'netflixWindow');
}

function openAmazonLink(linkType)
{
  
  if (document.body) {
		   browserWidth = eval(document.body.clientWidth);
	     browserHeight = eval(document.body.clientHeight);
		}else {
		   eval("browserWidth = " + innerWidth);
		   eval("browserHeight = " + innerHeight);
	}
  
  var attributeList="toolbar,location,status,menubar,scrollbars,resizable,width=" + eval(browserWidth-100) + ",height=" +eval(browserHeight-100);
  
  var URL = "/target_group/amazon/amazon_interstitial.jhtml?amazonCat=" + linkType;
  var newWindow = window.open(URL,"",attributeList);
}

function validateTextArea(txt, len)
{
var v;
v = txt.value;
if(v.length>len)
	{
	txt.value = v.substring(0,len-1);
	}
}

function closeWindowBackToParent() {
  window.close();
  window.opener.focus();
}