
// --------- BEGIN TAB MENU FUNCTION ----------------- //

//Set tab to intially be selected when page loads:
//[which tab (1=first tab), ID of tab content to display]:
var initialtab=[1, "features"];

//Turn menu into single level image tabs (completely hides 2nd level)?
var turntosingle=0; //0 for no (default), 1 for yes

//Disable hyperlinks in 1st level tab images?
var disabletablinks=0 ;//0 for no (default), 1 for yes

////////Stop editting////////////////

var previoustab="";

if (turntosingle==1)
	document.write('<style type="text/css">\n#tabcontentcontainer{display: none;}\n</style>');

function expandcontent(cid, aobject){
	if (disabletablinks==1)
		aobject.onclick=new Function("return false");
	if (document.getElementById && turntosingle==0){
		highlighttab(aobject);
		if (previoustab!=""){
			document.getElementById("features").style.display="none";
			document.getElementById("accessories").style.display="none";
			document.getElementById("manual").style.display="none";
			document.getElementById("software").style.display="none";
			document.getElementById("reviews").style.display="none";
		}
		if (cid == "features") {
			document.getElementById("feature_tab").style.backgroundImage = "url(../images/panel_feature_tab_1.gif)"; 
		}
		
		if (cid == "accessories") {
			document.getElementById("feature_tab").style.backgroundImage = "url(../images/panel_feature_tab_2.gif)"; 
		}
		
		if (cid == "manual") {
			document.getElementById("feature_tab").style.backgroundImage = "url(../images/panel_feature_tab_4.gif)"; 
		}
		
		if (cid == "software") {
			document.getElementById("feature_tab").style.backgroundImage = "url(../images/panel_feature_tab_3.gif)"; 
		}
		
		if (cid == "reviews") {
			document.getElementById("feature_tab").style.backgroundImage = "url(../images/panel_feature_tab_5.gif)";
		} 
		
		document.getElementById(cid).style.display="Block";
		previoustab=cid;
	}
}


function highlighttab(aobject){
	if (typeof tabobjlinks=="undefined")
		ok = collectddimagetabs();
	if (ok) {
		for (i=0; i<tabobjlinks.length; i++)
			tabobjlinks[i].className="";
		aobject.className="current";
	}
}

function collectddimagetabs(){
	var tabobj=document.getElementById("ddimagetabs");
	if (tabobj) {
		tabobjlinks=tabobj.getElementsByTagName("A");
		return true;
	}
}

function do_onload(){
	ok = collectddimagetabs();
	if (ok) {
		expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1]);
	}
}

if (window.addEventListener)
window.addEventListener("load", do_onload, false);
else if (window.attachEvent)
window.attachEvent("onload", do_onload);
else if (document.getElementById)
window.onload=do_onload;

// --------- END TAB MENU FUNCTION ----------------- //

//function AddtoCart(x) {
//	window.document.location = '/myaccount/cartit.asp?ac=add&pid=' + x + '&qty=1'; 
//}
function Show360(x) {
	win = window.open('360.asp?pc=' + x,'win360','scrollbars=no,resizable=no,width=500,height=335');
}
function Notify(x) {
	win = window.open('notifyme.asp?pc=' + x,'winNotify','scrollbars=no,resizable=no,width=500,height=270');
}
function Friend(x) {
	win = window.open('friend.asp?pc=' + x,'winNotify','scrollbars=no,resizable=no,width=500,height=305');
}
function ShowImages(x,y) {
	win = window.open('images.asp?pc=' + x + '&n=' + y,'winNotify','scrollbars=no,resizable=no,width=500,height=530');
}
// -->



function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function Newsletter(){
	if (!IsEmpty(newsfrm.email)){
		document.newsfrm.submit();
	}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//-->


