var $jq = jQuery.noConflict();

$jq(document).ready(function() {

	$jq(".my-account").hover(
			function () {
				$jq('#loginformslide').css('display', 'block');
			},
			function () {
				$jq('#loginformslide').css('display', 'none');
			}
	);
	
	if (jQuery.browser.msie && parseInt(jQuery.browser.version) <= 7) 
	{
		$jq(function() {
			var zIndexNumber = 1000;
			$jq('div').each(function() {
				$jq(this).css('zIndex', zIndexNumber);
				zIndexNumber -= 10;
			});
		}); 
	}


});


// Hide instruction text for password field
function txt2pwd(obj, pwd){
	obj.style.visibility = "hidden";
	document.getElementById(pwd).focus();
}
// Display instruction text for password field
function pwd2txt(obj, txt){
	if(obj.value.length==0){
		document.getElementById(txt).style.visibility = "visible";
	}
}
// Display instruction text [str] if field is blank
// Clear instruction text if field is clicked
function resetField(obj,str){
	if(obj.value.length==0){
		obj.value=str;
		return;
	}
	if(obj.value==str){
		obj.value="";
	}
}

// funktion checks in Backoffice eingabe JA oder Abbrechen
function salereallydelete(sale)
{
	Check = confirm("Wollen Sie den Auftrag " + sale + " wirklich "+unescape("l%F6schen")+"?");
	if (Check == false){
		return false;
	}else {
		return true;
	}
	
	
	 
}

// funktion checks in Backoffice eingabe JA oder Abbrechen bei Umsetzen des Mailstatus
function checkemailvalid(mail, status)
{
	Check = confirm("Wollen Sie die E-Mail Adresse: " + unescape(mail) + " wirklich " + status + unescape("l%F6schen")+"?");
	if (Check == false){
		return false;
	}else {
		return true;
	}
	
	
	 
}

// Switch two radiobuttons, with some ids 
function doSwitchByIDname(idnameon, idnameoff)
{
	if(idnameon.indexOf(",") > 0){
	  	var aIDon = idnameon.split(",");

		for(var k = 0; k < aIDon.length; k++)
		{
			document.getElementById(aIDon[k]).disabled = false;		
		}

	}else {
		document.getElementById(idnameon).disabled = false;
	}
	
	if(idnameoff.indexOf(",") > 0 ){
	  	var aIDoff = idnameoff.split(",");

		for(var k = 0; k < aIDoff.length; k++)
		{
			document.getElementById(aIDoff[k]).disabled = true;		
		}

	}else {
		document.getElementById(idnameoff).disabled = true;
	}
	

}


// Hides Main Content BOX and Show FRAME Box, set URL with HSID
function showShopIframe(id1, id2 , hsid, link)
{
	document.getElementById(id1).style.display = "None";
	document.getElementById(id2).style.display = "None";
	
	document.getElementById("subnavilink1").className = "";
	document.getElementById("subnavilink2").className = "";
	document.getElementById("subnavilink3").className = "";
	document.getElementById("subnavilink4").className = "";
	document.getElementById("subnavilink5").className = "";
	document.getElementById("subnavilink6").className = "";
	
	top.document.getElementById("hs_frameset").rows = "180, *";
	
	switch (link) {
	  case "1":	    
	  	document.getElementById("subnavilink1").className = "aActive";
	    parent.homesellershopframe.location.href = "http://shop.vodafone.de/online/index.cfm?go=handys.all&shopid=769&B_ID=39&hs_id="+hsid;
	    //parent.homesellershopframe.location.href = "http://www.quisma.de";
	    break;
	  case "2":	  
	    document.getElementById("subnavilink2").className = "aActive";  
	    parent.homesellershopframe.location.href = "http://shop.vodafone.de/online/index.cfm?go=handys.all&shopid=769&B_ID=39&hs_id="+hsid;
	    break;
	  case "3":	
	  	document.getElementById("subnavilink3").className = "aActive";    
	    parent.homesellershopframe.location.href = "http://shop.vodafone.de/online/index.cfm?go=callya.topseller&shopid=769&B_ID=39&hs_id="+hsid;
	    break;
	  case "4":	    
	  	document.getElementById("subnavilink4").className = "aActive";
	    parent.homesellershopframe.location.href = "http://shop.vodafone.de/online/index.cfm?go=zuhause_online.main&shopid=769&B_ID=39&hs_id="+hsid;
	    break;
	  case "5":	 
	  	document.getElementById("subnavilink5").className = "aActive";   
	    parent.homesellershopframe.location.href = "http://shop.vodafone.de/online/index.cfm?go=unterwegs_online.mit_dem_laptop&shopid=769&B_ID=39&hs_id="+hsid
	    break;
	  case "6":	    
	  	document.getElementById("subnavilink6").className = "aActive";
	    parent.homesellershopframe.location.href = "http://shop.vodafone.de/online/index.cfm?go=handys.all&shopid=769&B_ID=39&hs_id="+hsid;
	    break;	    
	  default:
	    document.getElementById(id1).style.display = "Block";
		document.getElementById(id2).style.display = "Block";
		 
	    break;
	}
	
}

 




