function openmembre(jsTarget) {
	 jsWidth = 630;
	 jsHeight = 650;
	window.open(jsTarget,"","width=" + jsWidth + ",height=" + jsHeight + ",toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");

}


var http_url_root = "http://uk.samsungmobile.com/";
var https_url_root = "https://uk.samsungmobile.com/";

function goMenu(menu1,menu2,menu3,menu4){
		if(menu1==null) menu1="";
		if(menu2==null) menu2="";
		if(menu3==null) menu3="";
		if(menu4==null) menu4="";
		document.location.href = http_url_root+"gomenu.jsp?menu1=" + menu1 + "&menu2=" + menu2 + "&menu3=" + menu3 + "&menu4=" + menu4;
	}

function goHome(){
		document.location.href = http_url_root+"index.jsp";
	}

function logIn(){
		document.location.href = http_url_root+"sg/signin.jsp";
	}

function logOut(){
		document.location.href = http_url_root+"include/xt_logout.jsp";
	}

function goJoin(membergbn) {
		var membergbn;
		if(membergbn == null || membergbn == '') membergbn = "";
		document.location.href = https_url_root+"member/register_01.jsp?MEMBERGBN="+membergbn;
	}

function whySignup() {			
		document.location.href = http_url_root+"member/whysignup.jsp";
	}


function goTotalSearch(){
            var objSetForm = eval("document.frm_search");

            var x_query = objSetForm.query.value;
            var x_query_en = "";

            re_del = new RegExp("[@<>()\\,\\[\\]\"\'\\\\\:\*]", "g");
            x_query_en = x_query.replace(re_del, " ");

            re_del = new RegExp("\\s+", "g");
            x_query_en = x_query_en.replace(re_del, " ");

            x_query_en = x_query_en.replace(/^\s*/, "").replace(/\s*$/, "");

            var is_null = x_query_en;

            re_del = new RegExp(" +", "g");
            is_null = is_null.replace(re_del, "");
            re_del = new RegExp("\\*+", "g");
            is_null = is_null.replace(re_del, "");

            if (is_null == "") {
                alert("Insert Keyword");
                objSetForm.query.focus();
                return false;
            }

            re_del = new RegExp("\\s+", "g");
            x_query_en = x_query_en.replace(re_del, " +");

            objSetForm.query.value = x_query_en;

            objSetForm.submit();
            return false;
        }

function viewCount() { 


			    //callPage("page_viewcount.jsp?page_number=0300000&id=");

		}	

function loginAlert(){
			//FFWindowOpen(WINDOW_ALIGN_CENTER,"/fra/login_alert.jsp","message",330,110,"");			
			FFWindowOpen(WINDOW_ALIGN_CENTER,"/login_alert.jsp","message",330,110,"");			
		}

function tellFriend(){

		//loginAlert();
		//FFWindowOpen(WINDOW_ALIGN_CENTER,"/fra/login_alert.jsp","message",330,110,"");							
		FFWindowOpen(WINDOW_ALIGN_CENTER,"http://uk.samsungmobile.com/login_alert.jsp","message",330,110,"");							
        }


function chgpage(Y){
	if(Y==0){document.Form1.sub.value="precedent"}
	if(Y==1){document.Form1.sub.value="suivant"}
	document.Form1.method="post";
	document.Form1.submit();
}
function chgspepage(num){
	document.Form1.currentpage.value=num
	document.Form1.method="post";
	document.Form1.submit();
}
function atteindre(num){
document.Form1.currentpage.value = num
document.Form1.submit()
	}


function Homepage(){
<!--
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm 

	//For testing use DocURL = "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm"
	DocURL = document.URL;
		
	//this is where the http or https will be, as found by searching for :// but skipping the res://
	protocolIndex=DocURL.indexOf("://",4);
	
	//this finds the ending slash for the domain server 
	serverIndex=DocURL.indexOf("/",protocolIndex + 3);

		//for the href, we need a valid URL to the domain. We search for the # symbol to find the begining 
	//of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
	//urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
	BeginURL=DocURL.indexOf("#",1) + 1;
	
	urlresult=DocURL.substring(BeginURL,serverIndex);
				
	//for display, we need to skip after http://, and go to the next slash
	displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);

	InsertElementAnchor(urlresult, displayresult);
}

function HtmlEncode(text)
{
    return text.replace(/&/g, '&amp').replace(/'/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
}

function TagAttrib(name, value)
{
    return ' '+name+'="'+HtmlEncode(value)+'"';
}

function PrintTag(tagName, needCloseTag, attrib, inner){
    document.write( '<' + tagName + attrib + '>' + HtmlEncode(inner) );
    if (needCloseTag) document.write( '</' + tagName +'>' );
}

function URI(href)
{
    IEVer = window.navigator.appVersion;
    IEVer = IEVer.substr( IEVer.indexOf('MSIE') + 5, 3 );

    return (IEVer.charAt(1)=='.' && IEVer >= '5.5') ?
        encodeURI(href) :
        escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');
}

function InsertElementAnchor(href, text)
{
    PrintTag('A', true, TagAttrib('HREF', URI(href)), text);
}

