function showSubmit()
{
var kind="";
    if(formCheck()){
	for (var i=0;i<document.subs.n.length;i++){
		if (document.subs.n[i].checked)
		   {
				kind=kind+document.subs.n[i].value+',';
			}
	}
		if(document.subs.subscription[0].checked==true)
		{type='subscription'}
		else
		{type='unsubscription'}
		
        var str= '';
        str= 'http://www.cn-c114.net/inc/newsdy.asp?' + 'kind='+kind+'&type='+type+ '&email='+document.subs.YourEmail.value;                
        win=window.open(str,'dy','width=500,height=245,scroll bars=no,status=no,toolbar=no,menubar=no,location=no');
    }
}
function formCheck()
{

	if (document.subs.YourEmail.value == "E-mail")
		{
		alert("Please input your email！");
		document.subs.YourEmail.focus();
		return false;
		}
    return true;
}

var typeText=new Array();
var typeLink=new Array();
var delay=80;	//文字出现的时间间隔
var i=0;
var j=0;
function typewrite(){
	var typed=document.getElementById("typed");
	typed.href=typeLink[j];
	if(i>typeText[j].length){
		typed.innerHTML=typeText[j].slice(0,i++);
		i=0;
		if(j>=typeText.length-1){j=0;}else{j++;}
		setTimeout("typewrite()",delay*30);
	}else{
		typed.innerHTML=typeText[j].slice(0,i++)+"_";
		setTimeout("typewrite()",delay);
	}
}

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=getFFVersion>=0.1? 16 : 0 
function IframeSize(iframename) {
  var pTar = null;
  if (document.getElementById){
    pTar = document.getElementById(iframename);
  }
  else{
    eval('pTar = ' + iframename + ';');
  }
  if (pTar && !window.opera){
    //begin resizing iframe
    pTar.style.display="block"
    
    if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight){
      //ns6 syntax
      pTar.height = pTar.contentDocument.body.offsetHeight+FFextraHeight; 
    }
    else if (pTar.Document && pTar.Document.body.scrollHeight){
      //ie5+ syntax
      pTar.height = pTar.Document.body.scrollHeight;
    }
  }
}

