/*
 Copyright 2004-2005, Commion Inc.
 Coder : Yasar Bayar
*/
// Date Created : 2005-01-06
	if (self.name==''){
			self.name='MainWindow';
	}
//-----------------------------
function AddOpt(oSlc,sT,sV){
	// Date Created : 2004-12-10
	oSlc.options.add (new Option(sT,sV));
}

function fstm(obj){ // form submit to mail
	// Date Created : 2005-02-18
	var sParams='';
	
	var arrInputs=obj.getElementsByTagName("INPUT");
	for (i=0;i<arrInputs.length;i++){
		if(arrInputs[i].name!='') sParams+=arrInputs[i].name+'='+arrInputs[i].value+'&';
	}

	var arrTextareas=obj.getElementsByTagName("TEXTAREA");
	for (i=0;i<arrTextareas.length;i++){
		if(arrTextareas[i].name!='') sParams+=arrTextareas[i].name+'='+arrTextareas[i].value+'&';
	}

	sParams='?'+sParams+'form_method=get';
	ow1(obj.action+sParams,"FormToMail",300,500);
}

function GEBID(s){ //getElementById
	return document.getElementById(s);
}

function ow1(sUrl,sWName,sW,sH){ // open window
	// Date Created : 2005-01-11
	w=window.open(sUrl,sWName,"width="+sW+",height="+sH);
	w.focus();
}

function pi1(id){
	// Date Created : 2004-12-24
	w=window.open("/lib/prevImage.asp?id="+id,"PreviewImage","width=550,height=600,scrollbars=yes,resizable=yes");
	w.focus();
}

function pi2(f){
	// Date Created : 2005-01-02
	w=window.open("/lib/prevImage2.asp?f="+f,"PreviewImage","width=600,height=600");
	w.focus();
}

function pi3(f){
	// Date Created : 2005-01-04
	w=window.open("/lib/prevImage2.asp?f="+f,"PreviewImage","width=600,height=600,scrollbars=yes,resizable=yes");
	w.focus();
}

function printPage(){
	// Date Created : 2005-08-23
	sPrint = "<html><head><title>Oracle Estate</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">";
	sPrint += "<link href=\"/m/css/lo_1.css\" rel=\"stylesheet\" type=\"text/css\" />";
	sPrint += "</head>";
	sPrint += "<script>alert('If the print dialouge box is not appeared automatically, please hold CTRL key and press P key. [CTRL+P]')</script>"
	sPrint += "<script defer language=\"VBscript\">\n call WB.ExecWB(6,1)</script>";
	//sPrint += "<script defer language=\"Javascript\">\n window.close();</script>";
	sPrint += "<body>";
	sPrint += document.getElementById("content").innerHTML;
	sPrint += "<OBJECT ID=\"WB\" WIDTH=0 HEIGHT=0 CLASSID=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"> </OBJECT>";
	sPrint += "</body></html>";
	p=window.open("","PrintPreview","width=530,height=600,scrollbars=yes");
	p.document.write(sPrint);
}

function printProperty(strPropCode){
	// Date Created : 2004-12-25
	sPrint = "<html><head><title>Oracle Estate</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">";
	sPrint += "<link href=\"/m/css/lo_1.css\" rel=\"stylesheet\" type=\"text/css\" />";
	sPrint += "<style type=\"text/css\">body,td,th {font-family: Tahoma, Arial;	font-size: 11px;color: #333333;}</style></head>"
	sPrint += "<script>alert('If the print dialouge box is not appeared automatically, please hold CTRL key and press P key. [CTRL+P]')</script>"
	sPrint += "<script defer language=\"VBscript\">\n call WB.ExecWB(6,1)</script>"
	//sPrint += "<script defer language=\"Javascript\">\n window.close();</script>"
	sPrint += "<body>"
	sPrint += "<div align=\"center\"><img src=\"/m/logo_small.gif\" width=\"200\" height=\"40\"></div>"
	sPrint += document.getElementById("divPropertyDetail").innerHTML;
	sPrint += "<div align=\"center\" style=\"bottom: 0px;position: relative;font-family: Tahoma, Arial;font-size: 12px;color: #CCCCCC;text-decoration: none;background-color: #006699;text-align: center;width: 500px;padding-top: 5px;\">&copy;2005, Oracle Estates<br />www.artemisproperties.co.uk - info@artemisproperties.co.uk<br>phone:0090256-813-2470/6458 fax:0090256-813-3641</div>";
	sPrint += "<OBJECT ID=\"WB\" WIDTH=0 HEIGHT=0 CLASSID=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"> </OBJECT>";
	sPrint += "</body></html>"
	p=window.open("","PrintPreview","width=530,height=600,scrollbars=yes");
	p.document.write(sPrint);
}

function printProperty2(strPropCode){
	p=window.open("/lib/Print_ProductDetail.asp?PropCode="+strPropCode,"PrintPreview","width=530,height=600");
	p.focus();
}
