
var googlecount ="0";
var win = null;


function NewWinIMVideo(mypage,myname,compname,desc,contact,mobile,url,add,query_href,phone)
{
var arr = mypage.split("/");
var comp_name =compname.replace(/\#/g,'\'');
var link_url = url.substr(0,30);
var link_url1 = url.substr(30,100);
var mix_url =''+link_url+'<br>'+link_url1+'';


var embedcode='';

if (mypage.search(/heavy\#\#/) != -1)
{
mypage = mypage.replace('heavy##','');
embedcode = '<DIV CLASS="sec-div"><object type="application/x-shockwave-flash" data="http://www.videowebtown.com/community/flvplayer/flvplayer.swf?file=http://www.videowebtown.com/indiamartvideo/video/'+mypage+'.flv&autoStart=false" WIDTH="391" HEIGHT="326" wmode="transparent"><param name="movie" value="http://www.videowebtown.com/community/flvplayer/flvplayer.swf?file=http://www.videowebtown.com/indiamartvideo/video/'+mypage+'.flv"><param name="wmode" value="transparent"><embed  src="http://www.videowebtown.com/community/flvplayer/flvplayer.swf?file=http://www.videowebtown.com/indiamartvideo/video/'+mypage+'.flv&autoStart=false" quality="high" bgcolor="#ffffff" width="352" height="288" name="movie" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object></div>';
}
else
{
embedcode = '<DIV CLASS="sec-div"><embed src="http://www.4shared.com/flash/flvplayer.swf" style="width:400px;height:326px" bgcolor="#ffffff" allowscriptaccess="always" allowfullscreen="true" flashvars="file=http://dc152.4shared.com/img/'+arr[0]+'/'+arr[1]+'/dlink__2Fdownload_2F'+arr[0]+'_2F'+arr[1]+'_3Fdsid_3DJGITKOINJZHYGJIAJPJYHXISIQKIJFIVHXHZHYJIIZJBJPIWKSIRKQITIGJTIAGHGCIAHYJHINIQKVKU/preview.flv&image=http://dc152.4shared.com/img/'+arr[0]+'/'+arr[1]+'/'+arr[2]+'&autostart=true"></embed></div>';

// embedcode = '<DIV CLASS="sec-div"><embed src="http://www.4shared.com/embed/'+mypage+'" style="width:400px;height:326px" allowfullscreen="true" allowscriptaccess="always"></embed></div>';

// embedcode = '<DIV CLASS="sec-div"><embed id="VideoPlayback" style="width:400px;height:326px" allowFullScreen="true" src="http://video.google.com/googleplayer.swf?docid='+mypage+'&hl=en&fs=true&autoplay=1" type="application/x-shockwave-flash"></embed></div>';
}
LeftPosition = (screen.width) ? (screen.width-800)/2 : 0;
TopPosition = (screen.height) ? (screen.height-450)/2 : 0;

var settings = 'width=800';
settings += ', height=450';
settings += ', top='+TopPosition+', left='+LeftPosition;
settings += ', directories=no';
settings += ', location=no';
settings += ', menubar=no';
settings += ', resizable=no';
settings += ', scrollbars=yes';
settings += ', status=no';
settings += ', toolbar=no';


win = window.open("",myname,settings);
win.document.write('<HTML><HEAD><TITLE>'+comp_name+' Video</TITLE><LINK HREF="/dir-viedo.css" REL="stylesheet" TYPE="text/css"><SCRIPT>function win_close(url){window.opener.location=url;	self.close();}</SCRIPT></HEAD><BODY LEFTMARGIN="0" TOPMARGIN="0"><DIV CLASS="maindiv"><TABLE WIDTH="778" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" BORDER="0"> <TR> <TD VALIGN="TOP"><IMG SRC="http://dir.imimg.com/gifs/left-top1.gif" alt="" WIDTH="7" HEIGHT="44"></TD> <TD BACKGROUND="http://dir.imimg.com/gifs/top-bg.gif" alt="" WIDTH="100%"> <DIV CLASS="top-txt" ALIGN="CENTER">Video by: <B> '+comp_name+'</DIV></TD> <TD VALIGN="TOP"><IMG SRC="http://dir.imimg.com/gifs/right-top1.gif" alt="" WIDTH="7" HEIGHT="44"></TD> </TR> </TABLE><TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH="100%"> <TR> <TD VALIGN="TOP">'+embedcode+'<div align="center"><div style="font-family:arial; font-size:16px; font-weight:bold; padding:5px; background:url(http://dir.imimg.com/gifs/vbg.gif); line-height:17px; margin:7px; border:1px solid #f7e19d; width:220px;" align="center"><A target="_new" onclick="win_close(\''+query_href+'\');" style="color:#0000FF; cursor:pointer; text-decoration:underline;">Click here to Send Enquiry</A></div></div></TD> <TD VALIGN="TOP"> <DIV ALIGN="JUSTIFY" CLASS="txt">'+desc+'</DIV> <DIV CLASS="div"> <P >CONTACT DETAILS</P></DIV><DIV CLASS="div1"><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" WIDTH="90%"> <TR> <TD VALIGN="TOP" CLASS="tab-cl" WIDTH="106">Contact Person</TD> <TD ALIGN="CENTER" VALIGN="TOP" CLASS="tab-cl" WIDTH="2">:</TD> <TD VALIGN="TOP" CLASS="tab-cl2">'+contact+'</TD> </TR> <TR> <TD VALIGN="TOP" CLASS="tab-cl"><nobr>Company Name</nobr></TD> <TD ALIGN="CENTER" VALIGN="TOP" CLASS="tab-cl">:</TD> <TD VALIGN="TOP" CLASS="tab-cl2">'+comp_name+'</TD> </TR>');
if(phone != '')
{
win.document.write('<TR> <TD VALIGN="TOP" CLASS="tab-cl">Phone</TD> <TD ALIGN="CENTER" VALIGN="TOP" CLASS="tab-cl">:</TD> <TD VALIGN="TOP" CLASS="tab-cl2">'+phone+'</TD> </TR>');
}
else if((mobile != '') && (phone == ''))
{
win.document.write('<TR> <TD VALIGN="TOP" CLASS="tab-cl">Mobile</TD> <TD ALIGN="CENTER" VALIGN="TOP" CLASS="tab-cl">:</TD> <TD VALIGN="TOP" CLASS="tab-cl2">'+mobile+'</TD> </TR>');
}
win.document.write('<TR> <TD VALIGN="TOP" CLASS="tab-cl">Address</TD> <TD ALIGN="CENTER" VALIGN="TOP" CLASS="tab-cl">:</TD> <TD VALIGN="TOP" CLASS="tab-cl2">'+add+'</TD> </TR> <TR> <TD VALIGN="TOP" CLASS="tab-cl-n">Website</TD> <TD ALIGN="CENTER" VALIGN="TOP" CLASS="tab-cl-n">:</TD> <TD VALIGN="TOP" CLASS="tab-cl2-n"><A HREF="'+url+'" target = _new>'+mix_url+'</A></TD> </TR> </TABLE></DIV><DIV CLASS="div2"><IMG SRC="http://dir.imimg.com/gifs/zero.gif" alt="" WIDTH="1" HEIGHT="1"></DIV></TD> </TR> </TABLE> <DIV CLASS="maindiv1"><IMG SRC="http://dir.imimg.com/gifs/bottom-left-1.gif" alt="" WIDTH="7" HEIGHT="9" ALIGN="LEFT"><IMG SRC="http://dir.imimg.com/gifs/bottom-right-1.gif" alt="" WIDTH="7" HEIGHT="9" ALIGN="RIGHT"></DIV></DIV></BODY></HTML>');
//win.document.close();
}


function NewWinIM(mypage,myname,compname)
{
var embedcode='';

if (mypage.search(/heavy\#\#/) != -1){
mypage = mypage.replace('heavy##','');
embedcode = '<div align="center"><object type="application/x-shockwave-flash" data="http://www.videowebtown.com/community/flvplayer/flvplayer.swf?file=http://www.videowebtown.com/indiamartvideo/video/'+mypage+'.flv&autoStart=false" width="352" height="288" wmode="transparent"><param name="movie" value="http://www.videowebtown.com/community/flvplayer/flvplayer.swf?file=http://www.videowebtown.com/indiamartvideo/video/'+mypage+'.flv"><param name="wmode" value="transparent"><embed  src="http://www.videowebtown.com/community/flvplayer/flvplayer.swf?file=http://www.videowebtown.com/indiamartvideo/video/'+mypage+'.flv&autoStart=false" quality="high" bgcolor="#ffffff" width="352" height="288" name="movie" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object></div>';
}
else
{
embedcode = '<div align="center"><embed id="VideoPlayback" style="width:400px;height:326px" allowFullScreen="true" src="http://video.google.com/googleplayer.swf?docid='+mypage+'&hl=en&fs=true&autoplay=1" type="application/x-shockwave-flash"></embed></div>';
}
LeftPosition = (screen.width) ? (screen.width-400)/2 : 0;
TopPosition = (screen.height) ? (screen.height-326)/2 : 0;

var settings = 'width=440';
settings += ', height=366';
settings += ', top='+TopPosition+', left='+LeftPosition;
settings += ', directories=no';
settings += ', location=no';
settings += ', menubar=no';
settings += ', resizable=no';
settings += ', scrollbars=no';
settings += ', status=no';
settings += ', toolbar=no';

win = window.open("",myname,settings);
win.document.write('<HTML><HEAD><TITLE>'+compname+' Video</TITLE><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"></HEAD><BODY BGCOLOR="#000000"><DIV style="color:white;font-size:11px;font-family:arial" align="center">Video by '+compname+'</DIV>'+embedcode+'</BODY></HTML>');
}


function NewWinGoogle(mypage,myname,compname)
{
var embedcode = '<div align="center"><embed id="VideoPlayback" style="width:400px;height:326px" allowFullScreen="true" src="http://video.google.com/googleplayer.swf?docid='+mypage+'&hl=en&fs=true&autoplay=1" type="application/x-shockwave-flash"> </embed></div>';
LeftPosition = (screen.width) ? (screen.width-400)/2 : 0;
TopPosition = (screen.height) ? (screen.height-326)/2 : 0;

var settings = 'width=440';
settings += ', height=366';
settings += ', top='+TopPosition+', left='+LeftPosition;
settings += ', directories=no';
settings += ', location=no';
settings += ', menubar=no';
settings += ', resizable=no';
settings += ', scrollbars=no';
settings += ', status=no';
settings += ', toolbar=no';

win = window.open("",myname,settings);
win.document.write('<HTML><HEAD><TITLE>'+compname+' Video</TITLE><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"></HEAD><BODY BGCOLOR="#000000"><DIV style="color:white;font-size:11px;font-family:arial" align="center">Video by '+compname+'</DIV>'+embedcode+'</BODY></HTML>');
}



function checkData(myobjname) {

	if (myobjname.ss.value.length < 3) {
		alert("Enter at least three characters for search.");
		myobjname.ss.focus();
		return false;
	} else {
		return true;
	}
}

function openchild_nl(thisurl)
{
	browserName = navigator.appName;
	browserVer = parseInt(navigator.appVersion);
	condition = !(( (browserName.indexOf("Explorer") >=0 ) && (browserVer < 4) ) ||  ((browserName.indexOf("Netscape") >=0 ) && (browserVer < 2) ) ) ;
	if (condition == true  )
		CanAnimate = true;
	else
		CanAnimate = false;

	var email_val = document.theForm.email.value;
	var from_site_val = document.theForm.from_site.value;
	var is_window_val = document.theForm.is_window.value;
	var org_referer = document.location;
	var thisurl_string = thisurl + "?email=" + email_val + "&from_site=" + from_site_val + "&is_window=" + is_window_val + "&org_referer=" + org_referer;

	if ( CanAnimate ) {
			msgWindow=window.open( '' ,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,width=550,height=240');
			msgWindow.focus();			
			msgWindow.location.href = thisurl_string;
	}
	else {
			msgWindow=window.open( thisurl_string,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,width=550,height=240');
			
	}
}



function validateit(theForm)
{
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(theForm.email.value)))
	{
		alert("Invalid Email ID. Kindly enter the correct ID.");
		theForm.email.focus();
		return (false);
	}
}



function getblank(this1)  {
	if (this1.value == "Your Email here.") {
		this1.value = "";
	}
	return true;
}


browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

condition = !(( (browserName.indexOf("Explorer") >=0 ) && (browserVer < 4) ) ||  ((browserName.indexOf("Netscape") >=0 ) && (browserVer < 2) ) ) ;

if (condition == true  )
    CanAnimate = true;
else
    CanAnimate = false;

function openchild(thisurl){
if ( CanAnimate ){

        var windowHeight;
        var windowWidth;
        var windowTop;
        var windowLeft;
        windowHeight=(screen.height*(80/100))*0.85;
        windowWidth=(screen.width*(57/100)-200);
        windowTop=(screen.height*(20/100))*0.8;
        windowLeft=screen.width*(40.2/100);

        msgWindow=window.open( '' ,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,top='+windowTop+',left='+windowLeft+',width='+windowWidth+',height='+windowHeight);	
        msgWindow.focus();
        msgWindow.location.href = thisurl;
}
else {
        msgWindow=window.open( thisurl,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,width=510,height=420');
	
}

}


function checkblankb2b() {
if (document.form2.ss.value.length == 0)
{
	alert('Kindly enter your search string');
	document.form2.ss.focus();
	return false;
}

if (document.form2.ss.value.length != 0) {
	   if (document.form2.ss.value.length <= 2) {
		   alert("Search string must contain at least 3 characters.");
		   document.form2.ss.focus();
		   return false;
	   }
}
else {
	return true;
}

}

function openpopup(thisurl)
{
	msgWindow=window.open( thisurl,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=no,menubar=no,resizable=yes,width=515, height=440,screenX=190,screenY=0');
}


