var fullURL = parent.document.URL // complete url address
//var reg = new RegExp("\/test\/*\/[0-9]+.htm"); // test server
var reg = new RegExp("\/pyt\/.*.htm"); // live server
var reg2 = new RegExp("\/search\/.*.php");

function parameter(queryString){
	var strAllParam;
	var strParam;
	var strValue;
	
	if(fullURL.indexOf("?") != -1){
		strAllParam = fullURL.split("?");
		strParam = strAllParam[1].split("&");
		for(i in strParam){
			strValue = strParam[i].split("=");
			if(strValue[0] == queryString){
				return strValue[1];
			}
		}
	}
	return "";
}
if(fullURL.match(reg) || fullURL.match(reg2)){
	var strVal = parameter("rc");
	if (isNaN(strVal) == false && strVal != ""){
    	document.cookie = "rc="+ strVal +";path=/;";
	}
}
