function getlink(t){
var myurl = document.location.host;
pat=/answers\.(.*)109/;
mat = myurl.match(pat);
myurl = "http://"+myurl.replace(mat[1], t.mylist.value);
//myurl = "http://"+myurl+"/"+t.mylist.value;
t.action =  myurl;
}
function SubSearch(v) 
{
   if(v==1){
	  if((document.qForm.qtitle.value=='Type Your Question Here') || (trim(document.qForm.qtitle.value)=='')){
   alert('Type Your Question in Box');
   }else{
   document.qForm.submit();
   }
   }else if(v==2){
	   if((document.searchFooterForm.txtfootSearch.value=='Type Your Question Here') || (document.searchFooterForm.txtfootSearch.value=='')){
   alert('Type Your Question in Box');
   }else{
   document.searchFooterForm.submit();
   }
   }else{
   if((document.searchForm.txtSearch.value=='Type Your Question Here') || (document.searchForm.txtSearch.value=='')){
   alert('Type Your Question in Box');
   }else{
   document.searchForm.submit();
   }
   }
   //document.searchForm.txtSearch.value = '';
   //document.searchForm.submit();
}
function clearvalue(t){
if(t.value =='Type Your Question Here'){
t.value ='';
}
}

function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}


//for enter key
function submitForm(m,e,f)
	{  
		//alert(window.event.keyCode);
		var keypress;
		if(window.event) {
		keypress = window.event.keyCode ;
		} else if(e){
		keypress = e.which;
		}
   if(keypress == 13)
	   {
		  if(trim(m.value) == ''){
			alert('Type Your Question in Box');
		  }else{
			document.forms[f].submit();
		  }
	   }
    }
// added by satya for report abuse

// added by pallavi
var pop = '';
function openwin(nm,width,height) {
	
	var name = nm;
	if (pop && !pop.closed) {
		
		pop.close();
	}
   
	pop = eval("window.open('"+name+"','NewWIN','chrome[4],toolbar=no,left=5,top=5,width="+width+",height="+height+",directories=no,menubar=no,SCROLLBARS=yes,left=2,right=2')");
	
	
	if (!pop.opener) popUpWin.opener = self;
	
}

