<!--
///////////////////////////////////////////////////////////////////////////////
//
// 张树林 - 慧佳工作室
//
// Module Name:     ocx.js
// Abstract:        地理位置选择
// Version:         1.0
// Date				2005-10-25
// Author:          woods·zhang
// Email:           hoojar@163.com 
// MSN:             hoojar@hotmail.com
// Copyright 2001-2008, Hoojar studio All Rights Reserved
//
// 版权 2001-2008，慧佳工作室所有版权保护

//The software for free software, allowing use, copy, 
//modify and distribute the software and files. Any 
//use of this software must place a copy of all the 
//above copyright notice. By the software Huijia studio 
//maintenance, if you have any queries please contact us.
//Thank you. 
//
//此软件为自由软件，允许使用、拷贝、修改、分发本软件及其文档。
//任何使用此软件的地方都得出现以上版权通告所有副本。此软件由
//慧佳工作室维护，如果您有什么疑问请与我们联系。谢谢使用。
//
///////////////////////////////////////////////////////////////////////////////
var isIe = (navigator.appName.indexOf("Internet Explorer") != -1) ? true : false;
var ocxObj;

//弹出对话框选择区域
function getArea(ob, path)
{
	ocxObj = ob;
	var ocxUrl = path + "/select-area.php";
	if (isIe)
	{
		var getDialog = window.showModalDialog(ocxUrl,"","dialogWidth=500px;dialogHeight=410px;status=0;help=no;scroll=no");
		if (getDialog != null && getDialog != "")
		{
			ob.value = getDialog;
		}
	}
	else
	{
		var needWidht = 500;
		var needHeight = 355;
		var scrwi = screen.width;
		var scrhe = screen.height;
		var woods = "";
		if (scrwi <= 800)
		{
			woods = "fullscreen=yes,resizable=yes";
		}
		else
		{
			var left = (scrwi - needWidht) / 2;
			var top = (scrhe - needHeight) / 2 ;
			woods = "left="+ left +",top=" + top + ",width=" + needWidht + ",height=" + needHeight + ",fullscreen=no,status=no,resizable=no,scrollbars=no,dialog=yes,modal=yes" ;
		}
		var dwin = open(ocxUrl, "woods", woods);
		dwin.focus();
	}
}

function resultArea(ov){ocxObj.value = ov;}
//-->