/*======================================================================*\
|| #################################################################### ||
|| # RainStudio 1.0.0                                                   ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2000–2004 Rainsoft Enterprises Ltd. All Rights Reserved.  ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- RAINSTUDIO IS NOT FREE SOFTWARE --------------- # ||
|| # http://www.putizi.net | http://www.putizi.net/license.html       # ||
|| #################################################################### ||
\*======================================================================*/

// #############################################################################
function jump(selectobj)
{
	sid = selectobj.options[selectobj.selectedIndex].value;

	if (sid == "")
	{
		return;
	}

	url = new String(window.location);
	fragment = new String("");

	// get rid of fragment
	url = url.split("?");

	// deal with the fragment first

	// deal with the main url
	url = url[0];

	// remove styleid=x& from main bit
	if (url.indexOf("cid=") != -1 && is_regexp)
	{
		re = new RegExp("cid=\\d+&?");
		url = url.replace(re, "");
	}

	// add the ? to the url if needed
	if (url.indexOf("?") == -1)
	{
		url += "?";
	}
	else
	{
		// make sure that we have a valid character to join our styleid bit
		lastchar = url.substr(url.length - 1);
		if (lastchar != "&" && lastchar != "?")
		{
			url += "&";
		}
	}
	window.location = url + "cid=" + sid + fragment;
}

//ÏÂÀ­ÁÐ±íÑ¡Ôñ
//obj	¿Ø¼þÃû³Æ
//sVale	Öµ
//Àý×Ó	ddlSelect(document.forms[0].ddltest,'0300');
function ddlSelect(obj,sVale)
{
	//alert(obj.options.length);
    //var fm=document.forms[0];//±íµ¥Ãû³Æ
    //ÏÂÀ­¿òÃû³Æ£ºddltest
    for(var i=0;i<obj.options.length ; ++i)
    {
        if (obj.options[i].value==sVale)
	      obj.options[i].selected=true;//ÖÃÎªÑ¡Ôñ×´Ì¬
    }
}

function openw(urlstr)
{
	var sNextWindow = "status=no,resizable=no,scrollbars=no,menubar=no,width=450,height=300,left=200,top=150"; 
	window.open(urlstr,'bkt',sNextWindow);
}
