// JavaScript Document
/* var mine = window.open('','','width=1,height=1,left=0,top=0,scrollbars=no');
 if(mine)
    var popUpsBlocked = false
 else
    var popUpsBlocked = true

//alert(popUpsBlocked);

if(popUpsBlocked)
  alert('We have detected that you are using popup blocking software.');
else
	mine.close();
*/	
function callPage(val)
{
	window.location.href	= "destination/"+val;
}

function ChangeImg_over(val)
{
	if (val == 1)
		document.homeImg.src= "images/reserve_fn.jpg";
	else
		document.homeImg.src= "images/reserve_en.jpg";
}

function ChangeImg_out(val)
{
	if (val == 1)
		document.homeImg.src= "images/reserve_f.jpg";
	else
		document.homeImg.src= "images/reserve_e.jpg";
}

function bookmarkme()
{ 
	var txt = "Bookmark Us!";
	var url = "http://www.kreditkarte.com/";
	var who = "Kreditkarte.com – der unabhängige Ratgeber";

	var ver = navigator.appName;
	var num = parseInt(navigator.appVersion);
	if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
		window.external.AddFavorite(url,who);
	}else{
		txt = "Press (Ctrl+D) to Bookmark Us!";
		alert(txt);
	}
}

function mycenteralpopwinVHS(fname,width,height)
{
	var file
	var sWidth	= 200
	var sHeight = 200
	
	if(width.length > 0){
	sWidth = width;
	}
	else{
	width =100;
	}
	
	if(height.length > 0){
	sHeight = height;
	}
	else{
	height =100;
	}
	
	file = fname
	file =file	
	
	var wintop  =window.screen.availHeight;
	var winleft =window.screen.availWidth;
	wintop  =(wintop/2) -(height/2)
	winleft =(winleft/2) -(width/2)
	//wintop  = 0
	//winleft = 0
	
	if ( sWidth > window.screen.availWidth )
		{ sWidth = window.screen.availWidth; }
	if (sHeight > window.screen.availHeight )
		{ sHeight = window.screen.availHeight; }
	if ( parseInt(sWidth) < width )
		{ sWidth = width; }
	if ( parseInt(sHeight) < height )
		{ sHeight = height; }
	
	if ( navigator.appName == "Microsoft Internet Explorer" )
		{ window.open(file, "_blank", "status=no, scrollbars=yes, toolbar=no, resizable=yes, location=no, menubar=no, top=" + wintop + ", left= "+ winleft +", height=" + sHeight + ", width=" + sWidth); 
		}
	if ( navigator.appName == "Netscape" ) 
		{ 
		window.open(file,"_blank","scrollbars=yes,alwaysRaised,dependant,innerheight=" + sHeight + ",innerwidth=" + sWidth); 		 
		//window.open(file,"_blank","alwaysRaised,dependant,scrollbars=yes,innerheight=" + sHeight + ",innerwidth=" + sWidth); 
		}
}

 function checkEmpty(frm)
	{
		if(frmPartner.txtUID.value == '')
		{
			alert('Please enter email address.');
			document.frmPartner.txtUID.focus();
			 return false; 
		}	
		else
		{
			var str=frmPartner.txtUID.value;
			var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
			if (filter.test(str))
			{
			}
			else
			{
				alert("Please enter a valid email address!")
				return false; 
			}
		}
		if(frmPartner.txtPWD.value == '')
		{
			alert('Please enter password.');
			document.frmPartner.txtPWD.focus();
			return false; 
		}	
		return true;
	}
	

function verifyNumeric(which)
{
	var oldvalue = [''];
    if (isNaN(which.value))
    {
        if (oldvalue[which])
        {
            which.value = oldvalue[which];
        }
        else
        {
            which.value = '';
            oldvalue[which] = '';
        }    
    }
    else
    {
        oldvalue[which] = which.value;
    }
}