function sok(){
	vchText = document.frmSearch.vchText.value;
	if(vchText == g_defaultsearchstring){
		document.frmSearch.vchText.value = "";
	}
	vchText = document.frmSearch.vchText.value;
	if (vchText.length > 2) {
		vchText = vchText.replace(" ","+");
		vchPath = strAppPath + "/index.asp?menuid=" + menuid + "&context=0&topExpand=" + topExpand + "&subExpand=" + subExpand + "&strUrl=//ips/core/IPS_search.asp?vchText=" + vchText + "&mode=" + mode;
		location.href = vchPath;
	}else {
		alert(strSearchAlert);
	}
}
					
function printerfriendly(io,ch){
	vchPath = strAppPath + "/ips/core/IPS_printer.asp?ch=" + ch + "&io=" + io + "&strUrl=" + strURL;
	vFeatures = "directories=no,height=700,width=550,left=50,top=50,location=no,menubar=no,status=no,titlebar=no,toolbar=no";
	vOpen = window.open(vchPath,"",vFeatures)
}
					
function tipafriend(io){
	vchPath = strAppPath + "/ips/core/IPS_tipafriend.asp?infoobjectid=" + io
	vFeatures = "width=470,height=370,directories=no,left=50,top=50,location=no,menubar=no,status=no,titlebar=no,toolbar=no";
	vOpen = window.open(vchPath,"",vFeatures)
}

var blankstate = new Object();
function blank(textfield) {
	if (blankstate[textfield.name]) return;
	blankstate[textfield.name] = true;
	textfield.value = '';
}

function openImages(ioid){
	theTop=(window.screen.availHeight/2)-280
	theLeft=(window.screen.availWidth/2)-280
	vFeatures = "fullscreen=no,height=500,width=430,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no,top=" + theTop + ",left=" + theLeft
	window.open(strAppPath + "/applications/system/publish/view/showobject.asp?infoobjectid="+ ioid,"",vFeatures)
}

function OpenWS(workspaceid, selObj) {
	
	document.all.frmOpenWS.workspaceid.value = workspaceid;
	window.event.cancelBubble = true;
	var websiteid;
	el = document.getElementById("sltWorkspace")
	websiteid = el[el.selectedIndex].getAttribute("websiteid")
	
	if(websiteid != ''){
		//if(bitInternal == 1){
		//	location.href = el[el.selectedIndex].getAttribute("internalsitepath") + "?rauth=1&workspaceid=" + workspaceid
		//}else{
			location.href = el[el.selectedIndex].getAttribute("sitepath") + "?rauth=1&workspaceid=" + workspaceid
		//}
	}else{
		document.all.frmOpenWS.submit();
		
	}
}

function logon(strurl){
	if(g_anon == '1'){
		location.href = strAppPath + "/index.asp?strurl=//include/authwrapper.asp?returnurl=" + strurl
	}else{
		location.href = strAppPath + "/index.asp?strurl=" + strurl
	}
}