/*
if(document.location.protocol == 'http:')
        document.location.replace('https://www.sangpaeda.com'
                                + document.location.pathname
                                + document.location.search
                                + document.location.hash);
*/

if(document.location.protocol == 'http:') {
	var strSearch = new String(document.location.search);
	var strRef = new String(document.referrer);
	var str_ref="OV_REFFER="+strRef;
	var strflag="";
	if(strSearch.length>0){strflag=(strRef.length>0)?"&"+str_ref:"";}else{strflag=(strRef.length>0)?"?"+str_ref:"";}
	var str_param=strSearch+strflag;
	location.href ='https://www.sangpaeda.com/'+str_param;
}

/**
if(document.location.host == 'sangpaeda.com' ||
	document.location.protocol == 'https:') {
	var strSearch = new String(document.location.search);
	var strRef = new String(document.referrer);
	var str_ref="OV_REFFER="+strRef;
	var strflag="";
	if(strSearch.length>0){strflag=(strRef.length>0)?"&"+str_ref:"";}else{strflag=(strRef.length>0)?"?"+str_ref:"";}
	var str_param=strSearch+strflag;
	location.href ='http://www.sangpaeda.com/'+str_param;
}
*/

