﻿//-----------------open new window------------------------//
function newwindow_blank(url){
	window.open(url.href);
}
function window_close(url){
	window.close(url.href);
}
function newwindow_self(url){
	window.location.href=url.href;
}
function newwindow_url(url){
	window.location.href=url;
}
function popupwindow(url,width,height){
	var wleft = (screen.width - width) / 2;
  	var wtop = (screen.height - height) / 2;
	vwindow = window.open(url, 'x','toolbar=0 ,width='+width+' ,height='+height+',left='+wleft+',top='+wtop+'', 'status=0' );
	vwindow.focus();
}
function popupwindow1(url,width,height){
	var vLink;
		vLink = url;
		var wleft = (screen.width - width) / 2;
		var wtop = (screen.height - height) / 2;		
		vwindow = window.open(vLink, 'x','toolbar=0 ,width='+width+' ,height='+height+',scrollbars=yes');
		vwindow.resizeTo(width, height);
		vwindow.moveTo(wleft, wtop);
		//window.location.reload();
		vwindow.focus();		
}
function chkLogin(){
	if(confirm(altLogin)){
		window.location.href='index.php';
		return true;
	}else{
		return false;
	}
}
//permission
GRANT=1;
ACCEPT=2;
EDIT=4;
//show-hidden
HIDDEN_BIRTHDAY=1;
HIDDEN_NATIONALITY=2;
HIDDEN_CURRENTADDRESS=4;
HIDDEN_EMAIL=8;
HIDDEN_DESC=16;