
//-------------------------------------------------------
//GET query
//-------------------------------------------------------
function GETvariable(varName,url){
	var varLimit=2;
	var i;
	var urlAry;
	var varAry;
	var workAry;
	
	urlAry=url.split('?',2);
	
	if(urlAry[1])varAry=urlAry[1].split('&',varLimit);

	if(varAry){
		for(i=0;i<varAry.length;i++){
			workAry=varAry[i].split('=',2)
			if(workAry[0]==varName)return workAry[1];
			}
		}

	return null;
} 

function GetCookie(name) {
	var regexp = new RegExp('; ' + name + '(=([^;]*))?;');
	var match  = ('; ' + document.cookie + ';').match(regexp);
	if (match) {
		return match[2];
	}
	
	else {
		return "";
	}
}
/*
if(GETvariable("cb",document.location.href)=="true"){
	d = new Date();
    d.setTime(d.getTime() + 0.5*60*60*1000); //30•ªŒã
    expire = d.toGMTString();
	document.cookie = 'cb=true; expires="+expire+"; path="/"';
	}*/
