﻿
//pop_win('win', 'http://', 0, 0, 300, 200, 0, 0, 0, 0, 0);
function pop_win(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
	toolbar_str = toolbar ? 'yes' : 'no';
	menubar_str = menubar ? 'yes' : 'no';
	statusbar_str = statusbar ? 'yes' : 'no';
	scrollbar_str = scrollbar ? 'yes' : 'no';
	resizable_str = resizable ? 'yes' : 'no';
	
	var left = (screen.width - width) / 2;
	var top  = (screen.height - height) / 2;
	winprops = 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str
	win = window.open(url, name, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}



function resize_photo(obj,size){
	if(obj.width > size){
			obj.width = size;
	}
}

function resizeImage(num)
{
	var width = eval('document.all.userImg'+num+'.width');
	if( width > 400 )
	{
		eval('document.all.userImg'+num+'.width = 400');
	}
}



function resize_photo2(obj){
	if(obj.width > 200){
			obj.width = 200;
	}
}

function ViewPhoto(url) { 
var imgwin = window.open("",'WIN','scrollbars=1,status=no,toolbar=0,resizable=no,location=no,menu=no,width=10,height=10'); 
imgwin.focus(); 
imgwin.document.open(); 
imgwin.document.write("<html>\n"); 
imgwin.document.write("<head>\n"); 
imgwin.document.write("<title>Part Time Love (http://www.parttimelove.com)</title>\n"); 
imgwin.document.write("<sc"+"ript>\n"); 
imgwin.document.write("function resize() {\n"); 
imgwin.document.write("pic = document.il;\n"); 
//imgwin.document.write("alert(eval(pic).height);\n"); 
imgwin.document.write("if (eval(pic).height) { var name = navigator.appName\n"); 
imgwin.document.write("  if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height + 19; myWidth = eval(pic).width;\n"); 
imgwin.document.write("  } else { myHeight = eval(pic).height ; myWidth = eval(pic).width; }\n"); 
imgwin.document.write("  clearTimeout();\n"); 
imgwin.document.write("  var height = screen.height;\n"); 
imgwin.document.write("  var width = screen.width;\n"); 
imgwin.document.write("  var leftpos = width / 2 - myWidth / 2;\n"); 
imgwin.document.write("  var toppos = height / 2 - myHeight / 2; \n"); 
//imgwin.document.write("  var toppos = height / 2 - 100; \n"); 
imgwin.document.write("  self.moveTo(leftpos, toppos);\n"); 
imgwin.document.write("  self.resizeTo(myWidth+30, myHeight+30);\n"); 
imgwin.document.write("}else setTimeOut(resize(), 100);}\n"); 
imgwin.document.write("</sc"+"ript>\n"); 
imgwin.document.write("</head>\n"); 
imgwin.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">\n'); 
imgwin.document.write("<div align=center><img border=0 src="+url+" xwidth=100 xheight=10 name=il onload='resize();' onclick='self.close()' style='cursor:hand;' title='PartTimeLove.com'></div>\n"); 
imgwin.document.write("</body>\n"); 
imgwin.document.close(); 
}


var n_idx = "";
var n_tidx = "";		
var open_type = "";	
var masteridx = ""; 
var n_url="";
function quicksetup(lv_id,lv_tid, lv_open_type, masteridx,url) {
	n_idx = lv_id;					//Message ID
	n_tidx = lv_tid;				//Sender ID
	open_type = lv_open_type;
	masteridx = masteridx;			//Member ID
	n_url=url;
}


function exec_menuitem(key) {
	switch(key) {
		case "EVENT1" :
			homepy_go(n_idx);
			break;
		case "EVENT2" :
			if(n_tidx==""){
		    alert("请登录后使用");
				return;
			}
			if (n_idx == n_tidx)
			{
			    alert("本人不可以给自己发送小纸条.");
				return;
			}
			sendmemo(n_idx);
			break;
		case "EVENT3" :
			if(n_tidx==""){
		    alert("请登录后使用");
				return;
			}
			sendmail(n_idx);
			break;
		case "EVENT4" :
			
			window.external.AddFavorite("http://www.5353.com/"+n_url,n_url);
			break;
		case "EVENT5" :
			if (n_idx == n_tidx)
			{
			  alert("本人不可以为自己添加朋友.");
				return;
			}
			invite(n_idx);
			break;
		case "EVENT6" :
			if(n_tidx==""){
		    alert("请登录后使用");
				return;
			}
	    alert("准备中.");
			break;
		case "EVENT7" :
			if(n_tidx==""){
		    alert("请登录后使用");
				return;
			}
			if (n_idx == n_tidx)
			{
		    alert("本人不可以申报自己");
				return;
			}
			indictment(n_idx);
			break;
		case "EVENT8" :
			if(n_tidx==""){
		    alert("请登录后使用");
				return;
			}
			if (n_idx == n_tidx)
			{
			  alert("不可以发送 SMS给自己");
				return;
			}
			alert("准备中.");
			//sendsms(n_idx);
			break;
		
		//Polopo
		case "EVENT10" :
			if(n_tidx=="")
			{
				alert("請登入後使用!");
				return;
			}
			
			document.location.href = "/PartTimeLove/Message/Compose2.aspx?ReceiveID=" + n_tidx ;
			break;
		case "EVENT11" :
			if(n_tidx=="")
			{
				alert("請登入後使用!");
				return;
			}
			
			document.location.href = "/PartTimeLove/Message/AddFriend.aspx?Ind=" + n_tidx;
			break;
		case "EVENT12" :
			if(n_tidx=="")
			{
				alert("請登入後使用!");
				return;
			}
			
			document.location.href = "/PartTimeLove/Member/Detail2.aspx?Ind=" + n_tidx;
			break;
	}

}

function homepy_go(tid) {

	lv_linkUrl = "/PartTimeLove/MiniHome/Home.aspx?MasterIdx=" + tid ;

	switch(open_type) {
		case "0" : 	
			document.location.href = lv_linkUrl;
			break;
		case "1" : 	
			parent.location.href = lv_linkUrl;
			break;
		case "2" : 	
			top.location.href = lv_linkUrl;
			break;
		case "3" : 
			//window.open(lv_linkUrl,'PopBlog','width=800,height=700');
			pop_win('PopMiniHome', lv_linkUrl, 0, 0, 940, 570, 0, 0, 0, 0, 0);
			break;
		case "4" : 	
			break;
		case "5" : 
			break;
		default :		
			document.location.href = lv_linkUrl;
			break;
	}
}

function sendmemo(idx){
	pop_win("","/PartTimeLove/MiniHome/RoomMain/SendMessage.aspx?MasterIdx="+idx+"&receiveridx="+n_idx, 0, 0, 315, 240, 0, 0, 0, 0, 0);
}

function sendmail(idx){
	pop_win("","/PartTimeLove/MiniHome/RoomMain/SendEmail.aspx?MasterIdx="+idx+"&receiveridx="+n_idx, 0, 0, 620, 385, 0, 0, 0, 0, 0);
}

function invite(idx){
	pop_win("","/PartTimeLove/MiniHome/Link/FriendSend.aspx?MasterIdx="+idx, 0, 0, 315, 260, 0, 0, 0, 0, 0);
}

function indictment(idx){
	pop_win("","/PartTimeLove/Main/Cyberpolice/Indictment.aspx?ReceiverIdx="+idx, 0, 0, 500, 640, 0, 0, 0, 0, 0);
}

function sendsms(idx){
	pop_win("SmsWindow","/PartTimeLove/SMS/Sms.aspx?ReceiverIdx="+idx, 0, 0, 500, 640, 0, 0, 0, 0, 0);
}
//	IE Script

	var NS4;
	var IE4;
	var mouse_top;
	var mouse_left;
	var scroll_top;
	var scroll_left;
	var event_id = "none";
	var status_over = false;	
	var parent_menu_name = "menu_parent";
	var child_menu_array = ["menu_child1"];
//	var child_menu_array = ["menu_child1", "menu_child2", "menu_child3"];
	var submenu_left_indent = 70;
	var column_height = 18;
	var submenu_top_indent = 0;
	var mainmenu_top_indent = 0;	
	var menuover_bgcolor = "#e4ff75";
	var menuover_fgcolor = "#ffffff";
	var default_menuover_bgcolor = "#ffffff";
	var default_menuover_fgcolor = "#000000";
	
	NS4 = (document.layers);
	IE4 = (document.all);
	isWin = (navigator.appVersion.indexOf("Win") != -1)
	
	if (NS4) {
		document.captureEvents(Event.CLICK)
		document.onclick = MouseDown;
	} else if (IE4) {
		document.onclick = MouseDown;
	}
	
	function startIt() {
	}
	
	function menuOver(ar_obj, ar_id) {
		status_over = true;
		changeColor(ar_obj);
		hideChild(event_id);
		viewSubMenu(event, ar_obj, ar_id);
				
	}
	
	function SubmenuOver(ar_obj) {
		status_over = true;
		changeColor(ar_obj);
	}
	
	function MouseDown(e) {
		event_target = event.srcElement;
		event_target = event_target.toString();
		event_check = event_target.indexOf("javascript:quicksetup(");		
		
		
		if (!status_over) hideAll();
		if (!event_check) {
			viewMenu(event,  parent_menu_name);
			return;
		}
		else {
			if (!status_over) hideAll();
			return;
		}
	}	
	
	function hideChild(ar_id) {
		if (event_id == "none") return;
		var menu_len = child_menu_array.length;
		for (i=0; i<menu_len; i++) eval(child_menu_array[i] + ".style.display = \"none\"");
	}
	
	function hideAll() {
		eval(parent_menu_name + ".style.display = \"none\"");
		if (event_id == "none") return;
		var menu_len = child_menu_array.length;
		for (i=0; i<menu_len; i++) eval(child_menu_array[i] + ".style.display = \"none\"");
	}

	function ShowAll() {
		eval(parent_menu_name + ".style.display = \"block\"");
		if (event_id == "none") return;
		var menu_len = child_menu_array.length;
		for (i=0; i<menu_len; i++) eval(child_menu_array[i] + ".style.display = \"block\"");
	}

	function viewMenu(e, ar_id) {
		if (ar_id == "none") return;
		menuLocBod = window.document.body;
		xPos = menuLocBod.scrollLeft + event.clientX-10;
		yPos = event.clientY + menuLocBod.scrollTop;
		screen_height = window.document.body.offsetHeight;
		screen_width = window.document.body.offsetWidth;
		mouse_top = e.y;
		mouse_left = e.x;
		eval("mainmenu_top_indent = " + parent_menu_name + ".children[0].children[0].children.length");
		mainmenu_top_indent = mainmenu_top_indent * column_height;
		
		//alert(screen_height);
		//alert(mouse_top + mainmenu_top_indent);
		if (screen_height > mouse_top + mainmenu_top_indent+130) 
			yPos = event.clientY + menuLocBod.scrollTop-20;
		else
			yPos = (event.clientY + menuLocBod.scrollTop) - mainmenu_top_indent-130;

		if (mouse_top - mainmenu_top_indent < 0) 
			yPos = event.clientY + menuLocBod.scrollTop-80;
			
		eval(ar_id + ".style.pixelTop =" + yPos);
		eval(ar_id + ".style.pixelLeft =" + xPos);		
		eval(ar_id + ".style.display = \"\"");
	}
	
	function viewSubMenu(e, ar_obj, ar_id) {
		if (ar_id == "none") return;
		event_id = ar_id;
		
		parent_top = menu_parent.style.pixelTop;
		parent_left = menu_parent.style.pixelLeft;
		child_top = ar_obj.style.pixelTop;
		child_left = ar_obj.style.pixelLeft;
		screen_height = window.document.body.offsetHeight;
		screen_width = window.document.body.offsetWidth;
		mouse_top = e.y;
		mouse_left = e.x;
		menuLocBod = window.document.body;
		xPos = menuLocBod.scrollLeft + parent_left + submenu_left_indent;
		eval("submenu_top_indent = " + ar_id + ".children[0].children[0].children.length");
		submenu_top_indent = submenu_top_indent * column_height;
		if (screen_height > mouse_top + submenu_top_indent) 
			yPos = event.clientY + menuLocBod.scrollTop;
		else
			yPos = (event.clientY + menuLocBod.scrollTop) - submenu_top_indent;
		
		if (mouse_top - submenu_top_indent < 0) 
			yPos = event.clientY + menuLocBod.scrollTop;
			
		eval(ar_id + ".style.pixelTop =" + yPos);
		eval(ar_id + ".style.pixelLeft =" + xPos);		
		eval(ar_id + ".style.display = \"\"");
	}
		
	function menuOut(ar_obj) {
		status_over = false;
		changeColor(ar_obj);
	}
	
	function changeColor(ar_obj) {
		if (ar_obj.style.background == menuover_bgcolor) {
			//ar_obj.style.color = default_menuover_fgcolor;
			ar_obj.style.background = default_menuover_bgcolor;
		} else {
			ar_obj.style.background = menuover_bgcolor;
			//ar_obj.children[0].style.color = menuover_fgcolor;
		}
	}

function HomepyOpen(idx){
	var w = 940;
	var h = 570;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=no,resizable=no'
	win = window.open("/PartTimeLove/MiniHome/Home.aspx?MasterIdx="+idx, "MiniHome", winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
document.write("<div id=\"menu_parent\" style=\"position:absolute;display:none;top:0;left:0\" onmouseover=\"ShowAll()\" onmouseout=\"hideAll()\" z-index=100>");
document.write("<table width=\"100\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"#B6B6B6\">");
document.write("	<tr> ");
document.write("		<td> ");
document.write("			<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"#FFFFFF\">");
//document.write("				<tr> ");
//document.write("					<td style=\"padding: 3 0 0 10\" height=\"23\" onmouseout=\"menuOut(this);\" onmouseover=\"menuOver(this, 'none');\" onclick=\"exec_menuitem('EVENT1');\" style=\"cursor:hand\" bgcolor=\"#FFFFFF\">进入迷你小屋</td>");
//document.write("				</tr>");
//document.write("				<tr> ");
//document.write("					<td background=\"/PartTimeLove/MiniHome/Img/Main/bg_dot.gif\" height=\"1\"></td>");
//document.write("				</tr>");how
//document.write("				<tr> ");
//document.write("					<td style=\"padding: 3 0 0 10\" height=\"23\" onmouseout=\"menuOut(this);\" onmouseover=\"menuOver(this, 'none');\" onclick=\"exec_menuitem('EVENT2');\" style=\"cursor:hand\" bgcolor=\"#FFFFFF\">发送小纸条</td>");
//document.write("				</tr>");
//document.write("				<tr> ");
//document.write("					<td background=\"/PartTimeLove/MiniHome/Img/Main/bg_dot.gif\" height=\"1\"></td>");
//document.write("				</tr>");
//document.write("				<tr> ");
//document.write("					<td style=\"padding: 2 0 0 10\" height=\"22\" onmouseout=\"menuOut(this);\" onmouseover=\"menuOver(this, 'none');\" onclick=\"exec_menuitem('EVENT3');\" style=\"cursor:hand\" bgcolor=\"#FFFFFF\">发送电子邮件</td>");
//document.write("				</tr>");
//document.write("				<tr> ");
//document.write("					<td background=\"/PartTimeLove/MiniHome/Img/Main/bg_dot.gif\" height=\"1\"></td>");
//document.write("				</tr>");
//document.write("				<tr> ");
//document.write("					<td style=\"padding: 2 0 0 10\" height=\"22\" onmouseout=\"menuOut(this);\" onmouseover=\"menuOver(this, 'none');\" onclick=\"exec_menuitem('EVENT8');\" style=\"cursor:hand\" bgcolor=\"#FFFFFF\">SMS发出</td>");
//document.write("				</tr>");
//document.write("				<tr> ");
//document.write("					<td background=\"/PartTimeLove/MiniHome/Img/Main/bg_dot.gif\" height=\"1\"></td>");
//document.write("				</tr>");
//document.write("				<tr> ");
//document.write("					<td style=\"padding: 2 0 0 10\" height=\"22\" onmouseout=\"menuOut(this);\" onmouseover=\"menuOver(this, 'none');\" onclick=\"exec_menuitem('EVENT4');\" style=\"cursor:hand\" bgcolor=\"#FFFFFF\">添加链接</td>");
//document.write("				</tr>");
//document.write("				<tr> ");
//document.write("					<td background=\"/PartTimeLove/MiniHome/Img/Main/bg_dot.gif\" height=\"1\"></td>");
//document.write("				</tr>");
//document.write("				<tr> ");
//document.write("					<td style=\"padding: 2 0 0 10\" height=\"22\" onmouseout=\"menuOut(this);\" onmouseover=\"menuOver(this, 'none');\" onclick=\"exec_menuitem('EVENT5');\"  style=\"cursor:hand\" bgcolor=\"#FFFFFF\">朋友申请</td>");
//document.write("				</tr>");
//document.write("				<tr> ");
//document.write("					<td background=\"/PartTimeLove/MiniHome/Img/Main/bg_dot.gif\" height=\"1\"></td>");
//document.write("				</tr>");
//document.write("					<td style=\"padding: 2 0 0 10\" height=\"22\" onmouseout=\"menuOut(this);\" onmouseover=\"menuOver(this, 'none');\" onclick=\"exec_menuitem('EVENT7');\"  style=\"cursor:hand\" bgcolor=\"#FFFFFF\">申报</td>");
//document.write("				</tr>");
document.write("				</tr>");
document.write("					<td style=\"padding: 2 0 0 10\" height=\"22\" onmouseout=\"menuOut(this);\" onmouseover=\"menuOver(this, 'none');\" onclick=\"exec_menuitem('EVENT10');\"  style=\"cursor:hand\" bgcolor=\"#FFFFFF\">發送留言</td>");
document.write("				</tr>");
document.write("				</tr>");
document.write("					<td style=\"padding: 2 0 0 10\" height=\"22\" onmouseout=\"menuOut(this);\" onmouseover=\"menuOver(this, 'none');\" onclick=\"exec_menuitem('EVENT11');\"  style=\"cursor:hand\" bgcolor=\"#FFFFFF\">成為朋友</td>");
document.write("				</tr>");
document.write("				</tr>");
document.write("					<td style=\"padding: 2 0 0 10\" height=\"22\" onmouseout=\"menuOut(this);\" onmouseover=\"menuOver(this, 'none');\" onclick=\"exec_menuitem('EVENT12');\"  style=\"cursor:hand\" bgcolor=\"#FFFFFF\">詳細資料</td>");
document.write("				</tr>");
document.write("			</table>");
document.write("		</td>");
document.write("	</tr>");
document.write("</table>");
document.write("</div>");


function over(obj){
	var arr = obj.childNodes[0].src.split("/");
	var i = 0;
	var url = '';
	for(i=0;i<arr.length-1;i++)
	{
		url = url  + arr[i] + '/';
	}
	url = url + 'change/' + arr[arr.length-1] ;
	obj.childNodes[0].src = url;
}
function out(obj){
	var arr = obj.childNodes[0].src.split("/");
	var i = 0;
	var url = '';
	for(i=0;i < arr.length-2;i++)
	{
		url = url + arr[i] + '/';
	}
	url = url + arr[arr.length-1];
	obj.childNodes[0].src = url;
}	



var HK1 = new Array("01","油尖旺 / YAU TSIM MONG","02","離島(機場) / ISLANDS","03","深水步 / SHAM SHUI PO","04","九龍城 / KOWLOON CITY","05","觀塘 / KWUN TONG");
var HK2 = new Array("06","黃大仙 / WONG TAI SIN","07","沙田 / SHA TIN","08","大埔 / TAI PO","09","新界北區 / NORTH N.T.","10","西貢 / SAI KUNG");
var HK3 = new Array("11","荃灣 / TSUEN WAN","12","葵青 / KWAI TSING","13","屯門 / TUEN MUN","14","元朗 / YUEN LONG","15","中西區 / CENTRAL & WESTERN");
var HK4 = new Array("16","灣仔 / WAN CHAI","17","港島南區 / SOUTHERN H.K. ISLAND","18","港島東區 / EASTERN H.K. ISLAND");


var CN1 = new Array("1001","北京","1002","天津","1003","河北","1004","山西","1005","内蒙古","1006","辽宁","1007","吉林","1008","黑龙江");
var CN2 = new Array("1009","上海","1010","江苏","1011","浙江","1012","安徽","1013","福建","1014","江西","1015","山东","1016","河南");
var CN3 = new Array("1017","湖北","1018","湖南","1019","广东","1020","广西","1021","海南","1022","重庆","1023","四川","1024","贵州");
var CN4 = new Array("1025","云南","1026","西藏","1027","陕西","1028","甘肃","1029","青海","1030","宁夏","1031","新疆");

var TW1 = new Array("TW001","基隆市","TW002","宜蘭縣",	"TW003","台北市","TW004","台北縣","TW005","桃園縣","TW006","新竹市","TW007","新竹縣","TW008","苗栗縣");
var TW2 = new Array("TW009","台中市","TW010","台中縣","TW011","南投縣","TW012","彰化縣","TW013","雲林縣","TW014","嘉義市","TW015","嘉義縣","TW016","台南市");
var TW3 = new Array("TW017","台南縣","TW018","高雄市","TW019","高雄縣","TW020","屏東縣",	"TW021","花蓮縣","TW022","台東縣","TW023","澎湖縣","TW024","金門縣","TW025","連江縣");

var HK = HK1.concat(HK2).concat(HK3).concat(HK4);
var CN = CN1.concat(CN2).concat(CN3).concat(CN4);
var TW = TW1.concat(TW2).concat(TW3);

function ChangeSubOption(pater,sub){
	var arr;
	var code = pater.options[pater.selectedIndex].value;
	try{
		var str = 'if(' + code + '){'
					+ 'arr = ' + code + ';'
					+ '}'
		eval(str);
	}
	catch(err){	
	}
	
	if(arr){
		var i = 0;
		var j= 0;
		sub.length = arr.length/2;
		for(;i<arr.length/2;i++,j=j+2){
			sub.options[i].value = arr[j];
			sub.options[i].text = arr[j+1];
		}
	}
	else{
		sub.length = 1;
		sub.options[0].value = pater.options[pater.selectedIndex].value;
		sub.options[0].text = pater.options[pater.selectedIndex].text;
	}
	
}

function SetPaterCity(pater,subvalue){

	var value = subvalue;
	if(HK.toString().indexOf(subvalue + ',') >= 0 ){
		value = "HK";
	}
	else if(CN.toString().indexOf(subvalue + ',') >= 0 ){
		value = "CN";
	}
	else if(TW.toString().indexOf(subvalue + ',') >= 0 ){
		value = "TW";
	}
	
	var i = 0;
	for(;i<pater.length;i++){
		if(pater.options[i].value == value){
			pater.options[i].selected = true;
			return;
		}
	}
	pater.options[pater.length-1].selected = true;
}

function SelectCityValue(obj,value){

	var i = 0;
	for(;i<obj.length;i++){
		if(obj.options[i].value == value){
			obj.options[i].selected = true;
			return;
		}
	}
}	

function ChangeSubOption_Search(pater,sub){
	var arr;
	var code = pater.options[pater.selectedIndex].value;
	
	try{
		var str = 'if(' + code + '){'
					+ 'arr = ' + code + ';'
					+ '}'
		eval(str);
	}
	catch(err){	
	}
	
	if(arr){
		var i = 0;
		var j= 0;
		sub.length = arr.length/2 + 1;
		sub.options[i].value = '0';
		sub.options[i].text = '所有地區';
		for(i=1;i<sub.length;i++,j=j+2){
			sub.options[i].value = arr[j];
			sub.options[i].text = arr[j+1];
		}
	}
	else{
		if(pater.selectedIndex == 0){
			sub.length = 1;
			sub.options[0].value = '0';
			sub.options[0].text = '所有地區';
		}
		else{
			sub.length = 2;
			sub.options[0].value = '0';
			sub.options[0].text = '所有地區';
			sub.options[1].value = pater.options[pater.selectedIndex].value;
			sub.options[1].text = pater.options[pater.selectedIndex].text;
		}
	}
	//sub.options[0].selected = true;
	
}