var pub='http://www.dms-test.com';
var cis='';
home =pub+"/main.asp";
main =pub+"/main.html";
english = pub+"/en/default.asp";
mailto = "mailto:service@bluebird.com";
contact = pub+"/info/info_detail.asp?class=123&id=374"; 
sitemap = pub+"/service/sitemap.asp";
url = pub+"/images/music/";

// 
sub01=pub+"/corp/about.asp"; 
   sub01a=pub+"/corp/about.asp"; 
   sub01b=pub+"/corp/culture.asp"; 
   sub01c=pub+"/corp/info.asp";  
   
//
sub02=pub+"/proview/overview.asp"; 
   sub02a=pub+"/proview/overview.asp";
   sub02b=pub+"/proview/newproduct.asp";

// 
sub03=pub+"/product/product_list.asp?catalogid=2"; 
   sub03a=pub+"/product/product_list.asp?catalogid=2";
   sub03b=pub+"/product/product_list.asp?catalogid=6"; 
   sub03c=pub+"/product/product_list.asp?catalogid=9"; 
   sub03d=pub+"/product/product_list.asp?catalogid=10"; 
//
sub04=pub+"/order/order1.asp"; 
   sub04a=pub+"/order/order1.asp"; 
   
// 
sub05=pub+"/service/service.asp"; 
   sub05a=pub+"/service/service.asp";
   sub05b=pub+"/service/info.asp";
   sub05c=pub+"/service/client.asp";
// 
sub06=pub+"/contact/contact.asp"; 
   sub06a=pub+"/contact/contact.asp"; 
   sub06b=pub+"/contact/info.asp"; 
	
function GoUrl(name, mode) {
	if (eval(name) == '') {
		alert("wrrong");
		return;	
	} else {
		if (!mode) {
    		document.location.href = eval(name);
		}
	}	
}	

// Menu
function GoMenu(name, mode) {
  if (eval(name) == '') {
		alert("Content comming soon.");
		return;
	} else {
    if (!mode) {
    		document.location.href = eval(name);
    } else {
			var values = mode.split('|');
			if(values.length == 2) {
				window.open(eval(name), '', 'width='+eval(values[0])+',height='+eval(values[1]));
			} else if(values.length > 2) {
				window.open(eval(name), '', 'width='+eval(values[0])+',height='+eval(values[1])+","+values[2]);
			} else {
    		window.open(eval(name), '');
			}
  	}
	}
}

//----------------------  S -------------------------------// 
function TopCn(){
document.writeln('<table width="100%"  border="0" cellspacing="0" cellpadding="0">');
document.writeln('<tr>');
document.writeln('<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="115">');
document.writeln('<param name="movie" VALUE='+pub+'/images/menu.swf?xmlurl='+pub+'/inc/flash_url.xml&depth01='+OneDepth+'&depth02='+TwoDepth+'>');
document.writeln('<param name="quality" value="high">');
document.writeln('<embed src='+pub+'/images/menu.swf?xmlurl='+pub+'/inc/flash_url.xml&depth01='+OneDepth+'&depth02='+TwoDepth+' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="115"></embed>');
document.writeln('</object></td>');
document.writeln('</tr>');
document.writeln('</table>');
}


function SubVisual(name){
document.writeln('<table width="100%"  border="0" cellspacing="0" cellpadding="0">');
document.writeln('<tr>');
document.writeln('<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="130">');
document.writeln('<param name="movie" value="'+pub+'/images/subVisual.swf">');
document.writeln('<param name="quality" value="high">');
document.writeln('<embed src="'+pub+'images/subVisual.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="130"></embed>');
document.writeln('</object></td>');
document.writeln('</tr>');
document.writeln('</table>');
}

function Quick(){
document.writeln("<table width=140  border=0 cellspacing=0 cellpadding=0>");
document.writeln("<tr><td height=20></td></tr>");
document.writeln("<tr><td width=140></td>");
document.writeln("<tr><td height=10></td></tr>");
document.writeln("<tr><td width=140></td>");
document.writeln("</table>");
}

function Left(){
document.writeln("<table border='0' cellpadding='0' cellspacing='0' width='100%'>");
document.writeln("<tr>");
document.writeln("	<td align='center'>");
document.writeln("	<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='180' HEIGHT='70'>");
document.writeln("	<PARAM NAME=movie VALUE='"+pub+"/images/logo.swf'> ");
document.writeln("	<PARAM NAME=quality VALUE=high>");
document.writeln("	<PARAM NAME=menu VALUE=false>");
document.writeln("	<EMBED src='"+pub+"/images/logo.swf' quality=high menu=false wmode=transparent width='180' height='70' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED>");
document.writeln("	</OBJECT>");
document.writeln("	</td>");
document.writeln("</tr>");
document.writeln("</table>");

document.writeln("<table border='0' cellpadding='0' cellspacing='0' width='100%'>");
document.writeln("<tr>");
document.writeln("	<td align='center'>");
document.writeln("	<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='180' HEIGHT='570'>");
document.writeln("	<PARAM NAME=movie VALUE='"+pub+"/images/menu.swf'> ");
document.writeln("	<PARAM NAME=quality VALUE=high>");
document.writeln("	<PARAM NAME=menu VALUE=false>");
document.writeln("	<PARAM NAME=wmode VALUE=transparent>")
document.writeln("	<EMBED src='"+pub+"/images/menu.swf' quality=high menu=false wmode=transparent width='180' height='570' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED>");
document.writeln("	</OBJECT>");
document.writeln("	</td>");
document.writeln("</tr>");
document.writeln("</table>");
}

function Right(){
document.writeln("<table border='0' cellpadding='0' cellspacing='0' width='100%'>");
document.writeln("<tr><td><img src='"+pub+"/img/common/right_img.gif' width='82' height='374'  border='0'></td></tr>");
document.writeln("<tr><td><img src='"+pub+"/img/common/right_bar.gif' width='15' height='250' border='0'></td></tr>");
document.writeln("</table>");
}

function FooterCn(name){
if(name=="sub"){
document.writeln("<table border='0' cellpadding='0' cellspacing='0' width='100%' height=3><tr><td width=20></td><td width=940 bgcolor=#99CCCC></td><td width=45 bgcolor=#F7F7F7></td></tr></table>");
}
document.writeln("<table border='0' bgcolor='#FFFFFF' cellpadding='0' cellspacing='0' width='1000'>");
document.writeln("<tr>");
document.writeln("<td width=15 height=60></td><td width=90><img src='"+pub+"/images/footer_logo.gif'></td>");
document.writeln("<td align=left><font style='color:#888888; font-family:Arial, Helvetica, sans-serif; font-size:11px;line-height:15px;'>Copyright &copy; 2000-2005 DMS(HONGKONG)CO.,LTD. All Rights Reserved. TEL:00852-97829953 FAX:00852-27572233<br> Headquarterr: 27/F., Hopewell Centre, 183 Queen's Road East, Hong Kong </font></td>");
document.writeln("<td align=left width=190><select name='Fsite' style='font-size:12px;color:#999;width:150px;' onchange='javascript:window.location.href=Fsite.value;'><option value='http://www./'>DMS(HONGKONG)CO.,LTD.</option><option value='http://www.dms-test.com/'>上海思帝测量系统有限公司</option></select></td>");
document.writeln("</tr>");
document.writeln("</table>");
}

function counter(){

document.writeln("<script src='http://www.designerclub.cn/uni/counter.asp?user_name=tpjl'></script>");
}

//---------------------- E -------------------------------// 

			
//Popup 		
function popup(Fn,Win, X, Y, Scroll){
l = (screen.width) ?	(screen.width- X) / 2	: 0;
t = (screen.height) ?	(screen.height- Y) / 2 : 0;	
	NewWindow=window.open(Fn,Win,'width='+X+',height='+Y+',top='+t+',left='+l+',scrollbars='+Scroll+',toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no');
}

// 
function winopen(theUrl,winSize){
  window.open(theUrl,"",winSize + "status=no, resizable=no, scrollbars=no");
}

// 
function sc_winopen(theUrl,winSize){
  window.open(theUrl,"",winSize + ",height=500, status=no, resizable=no, scrollbars=yes");
}

//
function move_site(frm) {
    var myindex=frm.selectedIndex
    if (frm.options[myindex].value != null) {
				 document.location.href(frm.options[myindex].value);
    }
}


//
function ViewWMV(titnum,url){
	window.open (cis + "/pub/pop_media_wmv.jsp?tnum="+titnum+"&murl="+url,"wmv","width=400,height=455,toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no,scrollbars=no");
}

function DownWMV(filename){
	//window.open (cis + "/pub/down_mov.jsp?a_file="+filename,"wmv","width=400,height=455,toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no,scrollbars=no");
	window.frDown.location.href=pub + "/img/media/"+filename;
}
function gotop(){
	document.body.scrollTop=0;
}



function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}


function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}